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

# Upload file

> Upload a single file to Null Drop with optional visibility control



## OpenAPI

````yaml POST /upload
openapi: 3.1.0
info:
  title: Null Drop API
  description: API do zarządzania plikami (upload, pobieranie, listowanie, usuwanie)
  version: 1.0.0
servers:
  - url: https://nulldrop.xyz/api/v1
security:
  - bearerAuth: []
paths:
  /upload:
    post:
      summary: Upload a file
      description: Upload a file to Null Drop
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '400':
          description: Upload failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    UploadResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            id:
              type: string
            filename:
              type: string
            size:
              type: integer
            mimeType:
              type: string
            downloadUrl:
              type: string
            shareUrl:
              type: string
            uploadedAt:
              type: string
              format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````