> ## Documentation Index
> Fetch the complete documentation index at: https://docs.golansertifikasi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post mediauploads

> Uploads a private-by-default file to quarantine. Only clean files can be downloaded.



## OpenAPI

````yaml /openapi/openapi.yaml post /media/uploads
openapi: 3.0.3
info:
  title: Golan Sertifikasi API
  version: 1.0.0
  description: >-
    Public REST API for Golan Sertifikasi web and mobile clients. All monetary
    values are integer IDR. Authenticate with Google ID token exchange; use the
    short-lived bearer token returned by the API.
servers:
  - url: /api/v1
security:
  - bearerAuth: []
paths:
  /media/uploads:
    post:
      tags:
        - Media
      description: >-
        Uploads a private-by-default file to quarantine. Only clean files can be
        downloaded.
      operationId: uploadMedia
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                visibility:
                  type: string
                  enum:
                    - private
                    - public
                  default: private
      responses:
        '201':
          description: Upload stored in quarantine and awaiting malware scan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaAsset'
        '400':
          description: Invalid file, filename, MIME type, or upload size.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Public visibility requires an instructor or administrator role.
        '413':
          description: Upload exceeds 50 MiB.
        '503':
          description: >-
            Authentication, S3 storage, or malware scanning dependencies are
            unavailable.
components:
  schemas:
    MediaAsset:
      type: object
      required:
        - media_id
        - original_name
        - mime_type
        - size_bytes
        - visibility
        - scan_status
        - status
        - created_at
      properties:
        media_id:
          type: string
        original_name:
          type: string
        mime_type:
          type: string
          enum:
            - application/pdf
            - image/jpeg
            - image/png
            - image/webp
        size_bytes:
          type: integer
          format: int64
          minimum: 1
          maximum: 52428800
        visibility:
          type: string
          enum:
            - private
            - public
        scan_status:
          type: string
          enum:
            - pending_scan
            - scanning
            - clean
            - infected
            - scan_failed
        status:
          type: string
          enum:
            - active
            - deleted
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - unauthorized
            - forbidden
            - invalid_google_credential
            - auth_not_configured
            - account_unavailable
            - self_referral
            - not_found
            - tax_policy_unavailable
            - finance_policy_unapproved
            - insufficient_balance
            - wallet_on_hold
            - reservation_pending
            - payment_pending
            - dependency_unavailable
            - payment_unavailable
            - push_unavailable
            - media_unavailable
            - upload_too_large
            - amount_mismatch
            - invalid_status
            - invalid_coupon
            - gateway_request_failed
            - gateway_verification_failed
            - conflict
            - invalid_request
            - idempotency_key_required
            - invalid_idempotency_key
            - internal_error
        message:
          type: string
        request_id:
          type: string
  responses:
    Unauthorized:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.