Skip to main content

Get file upload URL

GET 

/api/v1/files/upload_url

Get a signed URLs for uploading local files to Needle. The upload URLs will be valid for a short time therefore the files should be uploaded immediately after receiving the URL. Tip: repeat content_type parameter to generate multiple upload URLs at once.

After upload is complete, your file will be private and protected. Here is how you can upload files using the signed upload URL:

curl -X PUT [upload_url] \
-H "Content-Type: [content_type]" \
--upload-file [path/to/your-file]

If you want to read the files later, you will need to use a signed download URL.

Request

Query Parameters

    content_type string[]required

    Possible values: [application/pdf, text/html, text/plain]

Responses

Successful response

Schema

    result

    object[]

    required

    URLs for uploading files and adding them to collections

  • Array [

  • url urirequired

    File URL that can be used for adding the file to collections

    upload_url urirequired

    Signed URL to upload the file to

  • ]

Loading...