API Documentation

API Documentation

⚡

This documentation outlines how to use the Ashlynn Repository API to upload images and videos to the platform.


Endpoints:

  • POST /upload - Direct file upload via form data.
  • GET /?url=[media_url] - Uploads media from a specified URL.

Base URLs

Use the following base URLs for each method:

  • POST: https://upload.itz-ashlynn.workers.dev/upload
  • GET: https://upload.darkhacker7301.workers.dev/?url=[media_url]

POST Method

Description:

Uploads a media file (image or video) directly using multipart/form-data, suitable for client-side form submissions.

  • Header: Content-Type: multipart/form-data (Required)

Form Data Parameters

ParameterTypeRequiredDescriptionfilefileYesThe media file to upload (image or video, max 20MB).Usage Example

bash
Copy code
curl -X POST https://upload.itz-ashlynn.workers.dev/upload \
-H "Content-Type: multipart/form-data" \
-F "file=@path/to/your/file.jpg"

GET Method

Description:

Fetches and uploads media from a provided URL (image or video, up to 20MB).

Usage:

GET /?url=[media_url]

Parameters

ParameterTypeRequiredDescriptionurlstringYesThe media file URL to upload (image or video, max 20MB).Usage Example

To upload using a URL, make a GET request as follows:

bash
Copy code
https://upload.darkhacker7301.workers.dev/?url=https://example.com/path/to/media.jpg

Notes

  • POST Method: Best for uploading files from client-side forms.
  • GET Method: Suitable for uploading media files hosted online; the server retrieves the file directly from the specified URL.


Report Page