Skip to content

File Endpoints

GET /files

Fetch all files stored on Cumulonimbus.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_READ_FILES scope.

Parameters

NameTypeLocationRequiredDescription
limitnumberqueryNoThe maximum number of files to return. The default and maximum value is 50
offsetnumberqueryNoThe offset to start from when returning files. The default value is 0

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files?limit=5&offset=0"
js
fetch('https://alekeagle.me/api/files?limit=5&offset=0', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /files?uid=:id

Fetch files owned by the specified user.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the STAFF_READ_FILES scope.

Parameters

NameTypeLocationRequiredDescription
limitnumberqueryNoThe maximum number of files to return. The default and maximum value is 50
offsetnumberqueryNoThe offset to start from when returning files. The default value is 0
uidstringqueryYesThe User's ID.

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files?limit=5&offset=0&uid=1234567890123"
js
fetch('https://alekeagle.me/api/files?limit=5&offset=0&uid=1234567890123', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /files?uid=me

Fetch files owned by the authenticated user.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_READ scope.

Parameters

NameTypeLocationRequiredDescription
limitnumberqueryNoThe maximum number of files to return. The default and maximum value is 50
offsetnumberqueryNoThe offset to start from when returning files. The default value is 0
uidstringqueryYesMust be the string me.

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files?limit=5&offset=0&uid=me"
js
fetch('https://alekeagle.me/api/files?limit=5&offset=0&uid=me', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

GET /files/:id

Get a file by its ID. Attempting to fetch a file owned by another user without staff permissions or scoped sessions without the proper scopes will return a 404 error regardless of whether the file exists. This is to prevent scraping via the API.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_READ (STAFF_READ_FILES for staff) scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe file ID

Example Requests

sh
curl -X GET \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files/abcdefghij.png"
js
fetch('https://alekeagle.me/api/files/abcdefghij.png', {
  method: 'GET',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

PUT /files/:id/name

Update a file's display name. Attempting to modify a file owned by another user without staff permissions or scoped sessions without the proper scopes will return a 404 error regardless of whether the file exists. This is to prevent scraping via the API.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_MODIFY(6)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe file ID
namestringbodyYesThe new display name

Example Requests

sh
curl -X PUT \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"name": "My File"}' \
"https://alekeagle.me/api/files/abcdefghij.png/name"
js
fetch('https://alekeagle.me/api/files/abcdefghij.png/name', {
  method: 'PUT',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'My File',
  }),
});

Responses

DELETE /files/:id/name

Delete a file's display name. Attempting to modify a file owned by another user without staff permissions or scoped sessions without the proper scopes will return a 404 error regardless of whether the file exists. This is to prevent scraping via the API.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_MODIFY(6)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe file ID

Example Requests

sh
```sh [cURL]
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files/abcdefghij.png/name"
js
fetch('https://alekeagle.me/api/files/abcdefghij.png/name', {
  method: 'DELETE',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

PUT /files/:id/extension

Update a file's extension. Attempting to modify a file owned by another user without staff permissions or scoped sessions without the proper scopes will return a 404 error regardless of whether the file exists. This is to prevent scraping via the API.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_MODIFY(6)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Warning

Since the file extension is part of the file's ID, changing the extension will change the file's ID. This means that any links to the file will no longer work.

Note

When a file's extension is changed, it is logged to the server's logs, that way staff can use this information to help improve the file type detection.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe file ID
extensionstringbodyYesThe new file extension

Example Requests

sh
curl -X PUT \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"extension": "png"}' \
"https://alekeagle.me/api/files/abcdefghij.png/extension"
js
fetch('https://alekeagle.me/api/files/abcdefghij.png/extension', {
  method: 'PUT',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    extension: 'png',
  }),
});

Responses

DELETE /files/:id

Delete a file. Attempting to delete a file owned by another user without staff permissions or scoped sessions without the proper scopes will return a 404 error regardless of whether the file exists. This is to prevent scraping via the API.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_DELETE(7)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Parameters

NameTypeLocationRequiredDescription
idstringpathYesThe file ID

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
"https://alekeagle.me/api/files/abcdefghij.png"
js
fetch('https://alekeagle.me/api/files/abcdefghij.png', {
  method: 'DELETE',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
});

Responses

DELETE /files

Delete multiple files. Attempting to delete files owned by another user without staff permissions will have them removed from the list of files to be deleted. Scoped sessions missing the required scope will receive 403 forbidden.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_DELETE(7)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Parameters

NameTypeLocationRequiredDescription
idsstringbodyYesThe file IDs

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"ids":["abcdefghij.png","klmnopqrst.png"]}' \
"https://alekeagle.me/api/files"
js
fetch('https://alekeagle.me/api/files', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    ids: ['abcdefghij.png', 'klmnopqrst.png'],
  }),
});

Responses

DELETE /files/all

Deletes all files owned by the authenticated user.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_DELETE(7)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can found in the Identity Reverification section.

Parameters

There are no parameters for this endpoint.

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
"https://alekeagle.me/api/files/all"
js
fetch('https://alekeagle.me/api/files/all', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});

Responses

DELETE /files/all?uid=me

Equivalent to DELETE /files/all

DELETE /files/all?uid=:id

Deletes all files owned by the user specified.

Non-Public Endpoint

This endpoint is not public and requires authentication of a user with staff permissions.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_DELETE(7)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the FILE_MODIFY (STAFF_MODIFY_FILES for staff) scope.

Identity Reverification

This endpoint will require you to provide your password to confirm it's you. More information can found in the Identity Reverification section.

Parameters

NameTypeLocationRequiredDescription
uidstringqueryYesThe User's ID.

Example Requests

sh
curl -X DELETE \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-H "Content-Type: application/json" \
-d '{"password":"password"}' \
"https://alekeagle.me/api/files/all?uid=me"
js
fetch('https://alekeagle.me/api/files/all?uid=me', {
  method: 'DELETE',
  headers: {
    'Authorization':
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    password: 'password',
  }),
});

Responses

POST /upload

Uploads a file to the server.

Kill Switch Behavior

This endpoint is affected by the following kill switches:

  • FILE_CREATE(5)

and will fail with the error ServiceUnavailable if any of these kill switches are enabled.

Scoped Session

Requests to this endpoint using a scoped session require the session to have the UPLOAD_FILE scope.

Email Verification Requirement

A verified email is required to upload files.

Parameters

NameTypeLocationRequiredDescription
filefilebodyYesThe file

Request Content-Type

To upload a file, you must use the multipart/form-data content type.

Example Requests

sh
curl -X POST \
-H "Authorization: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q" \
-F "file=@/path/to/file.png" \
"https://alekeagle.me/api/upload"
js
const formData = new FormData();
formData.append('file', file);

fetch('https://alekeagle.me/api/upload', {
  method: 'POST',
  headers: {
    Authorization:
      'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiVGhlIGV4YW1wbGUgdG9rZW4gZm9yIGRvY3MuYWxla2VhZ2xlLm1lIiwic3ViIjoiMTY0NzAxNTAyODYyNiIsImlhdCI6MTY4NzA2NzYxNCwiZXhwIjoyMDAyNjQzNjE0fQ.qAwhjhtGT56iAI52EsdVYcaTjmLPeR51TALkJ1CwRlfyDHwrsOTzAe8Y3za_tJqkvSaohwQq4cD7lZbTzMSw8Q',
  },
  body: formData,
});

Responses

Made with ❤️ by Alek Evans (AlekEagle)