I'm using loopback Api Explorer I need to upload a file by explore how can I upload that because I don't find any option to upload file please refer the screenshot
Asked
Active
Viewed 2,413 times
6
-
1Have you looked into the Loopback Storage component? https://docs.strongloop.com/display/public/LB/Storage+component – JSimonsen Sep 08 '15 at 18:27
-
If your on Mac you can also git Paw a go https://paw.cloud/ see the documenation on file upload/multipart body https://paw.cloud/docs/getting-started/set-request-body#Set_Multipart_body – Matthaus Woolard Oct 18 '16 at 04:53
3 Answers
4
Simply put, the answer is that you can't. Uploading a file requires multi-part form data. This isn't currently possible via the loopback-component-explorer. You should checkout the loobpack-component-storage instead. There is an example here; I recommend using the example-2.0
.

richardpringle
- 796
- 5
- 22
1
Simpler than using Postman would be using curl direct on the terminal :
Here is the command I use when need(I work with some services using loopback/explorer as well) :
curl -i -X POST -H "Content-Type: multipart/form-data" -F "blob=@/path/to/your/file.jpg" -v http://HOST:PORT/pathToYourEndpoint?access_token=xxxxxxxxxxx

Marco Barcellos
- 196
- 2
- 4