Upload a project file

Changed on

Upload a file to the project's S3 storage. Supports images, audio, video, text files, documents, fonts, and archives. Maximum file size is 100MB.

post/project-files/upload

Request

  • Base URL
    https://api.web2wave.com/api
  • URL
    https://api.web2wave.com/api/project-files/upload
  • Auth
    API key in header api_key

Headers

api_keystring required

API key for authentication

Request body multipart/form-data

filestring binary required

The file to upload (max 100MB). Supported types include images, audio, video, text files, PDFs, documents, fonts, and archives.

pathstring

Optional subfolder path within the project directory

Example request

{
  "path": "assets/images"
}

Response

File uploaded successfully

urlstring

Public URL of the uploaded file

filenamestring

Original filename

pathstring

Full storage path of the file

formatstring

Font format (woff2, woff, ttf, otf, eot). Only present when the uploaded file is a font.

css_formatstring

Value for the CSS format() function. Only present when the uploaded file is a font.

family_suggestionstring

Suggested font-family name derived from the filename. Only present when the uploaded file is a font.

Example response

{
  "url": "https://s3.amazonaws.com/bucket/projects/production/123/assets/images/logo.png",
  "filename": "logo.png",
  "path": "projects/production/123/assets/images/logo.png",
  "format": "woff2",
  "css_format": "woff2",
  "family_suggestion": "Inter"
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status