This API endpoint /api/resource/upload
allows users to upload resources to our server. Below are the details and instructions on how to use this endpoint effectively.
Usage
To upload a resource, you need to send a POST request to /api/resource/upload
with the necessary data. Here's a simple example using curl
:
curl -X POST -F "file=@/path/to/your/file" http://yourdomain.com/api/resource/upload
Requirements
- The file size should not exceed 10MB.
- Supported file types are
.jpg
,.png
,.pdf
, and.txt
.
Response
Upon successful upload, the server will respond with a JSON object containing the upload status and file information.
{
"status": "success",
"file": {
"name": "example.jpg",
"size": "123456",
"type": "image/jpeg"
}
}
Additional Resources
For more information on our API, please visit our API Documentation.
Upload Example