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

# Upload a file to storage



## OpenAPI

````yaml /api-reference/openapi.json post /api/storage/upload
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/storage/upload:
    post:
      tags:
        - Storage
      summary: Upload a file to storage
      operationId: StorageController_uploadFile
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                bucket:
                  type: string
                  description: 'Bucket name (default: "default")'
                  example: default
              required:
                - file
      responses:
        '200':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  path:
                    type: string
                    example: default/9bea7ee3-ddc3-4215-a9e6-74fa7b5be92f.png
                  bucket:
                    type: string
                    example: default
                  fullPath:
                    type: string
                    example: /default/9bea7ee3-ddc3-4215-a9e6-74fa7b5be92f.png

````