Files

Start an upload

Changed on

Checks that a file may be uploaded for purpose (its type and size, the user's permissions and the organization's storage limit) and returns a signed request that uploads it straight to storage, which works for 10 minutes. Send the file with that request's method and headers, then put it to use with the purpose's endpoint (PUT /v1/users/me/image for avatar, PUT /v1/organizations/{organizationId}/logo for logo, attachmentIds of POST /v1/feedback and PATCH /v1/feedback/{number} for feedback-attachment). Files that are never put to use are deleted after a day

post/api/v1/files/uploads

Request

  • Base URL
    https://app.easyscraper.com
  • URL
    https://app.easyscraper.com/api/v1/files/uploads
  • Auth
    API key in cookie better-auth.session_token

Request body

purpose'avatar' | 'logo' | 'feedback-attachment' required
organizationIdstring uuid
contentTypestring required
sizeinteger required

Response

OK

fileIdstring uuid required

Changes