---
title: "Upload File"
url: "https://developer.migros.ch/apis/buckyput-1/versions/836065f9-cb40-4523-ae99-6b052f1a2e02/operations/upload_file"
---

> Full API specification: https://developer.migros.ch/apis/buckyput-1/versions/836065f9-cb40-4523-ae99-6b052f1a2e02.md

# Upload File

`POST` `/migros/enterprise-support/adp-upload/v1/file`

Operation ID: `upload_file`

Route for uploading file data to the desired folder of a bucket.

## Query parameters

- `folder` (string, optional) - The folder name inside the bucket, where the files will be stored

## Request body

Content types: `multipart/form-data`

## Responses

- `201` - Upload was successful.
- `default` - Standard HTTP semantics; no machine-interpretable body.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Buckyput
  version: 1.1.0-beta.1
servers:
  - description: URL of upstream
    url: https://api.migros.ch
paths:
  /migros/enterprise-support/adp-upload/v1/file:
    post:
      description: Route for uploading file data to the desired folder of a bucket.
      operationId: upload_file
      parameters:
        - $ref: "#/components/parameters/folder"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              type: object
        description: File to upload.
      responses:
        "201":
          $ref: "#/components/responses/CreatedResponse"
        default:
          $ref: "#/components/responses/DefaultResponse"
      security:
        - Basic-Auth: []
      summary: Upload File
      tags:
        - Upload
security:
  - Basic-Auth: []
components:
  parameters:
    folder:
      description: The folder name inside the bucket, where the files will be stored
      in: query
      name: folder
      required: false
      schema:
        type: string
  responses:
    CreatedResponse:
      description: Upload was successful.
      headers:
        X-Created-File:
          description: Base file name under which data was saved.
          schema:
            type: string
        X-Created-Path:
          description: Full path under which data was saved.
          schema:
            type: string
    DefaultResponse:
      content:
        text/plain:
          schema:
            type: string
      description: Standard HTTP semantics; no machine-interpretable body.
  securitySchemes:
    Basic-Auth:
      description: Kong basic-auth authentication
      scheme: basic
      type: http
```
