Files

Upload File

You can upload file by using the /files/upload endpoint but in header the Content-Type should be multipart/form-data.

[POST] https://api.escuelajs.co/api/v1/files/upload
{
  "file": "<Binary File>"
}

The response is like this:

{
  "originalname": "Djhv7NO - Imgur.png",
  "filename": "f3a5.png",
  "location": "https://api.escuelajs.co/api/v1/files/f3a5.png"
}

Get a file

You can get a single file by adding the fileName as a parameter: /files/{fileName}

[GET] https://api.escuelajs.co/api/v1/files/f3a5.png
Platzi Fake Store API - Simple and powerful API for your e-commerce prototype | Product Hunt