Loopback Download file

Viewed 1892

I am following the document for download the file.

https://docs.strongloop.com/display/public/LB/Storage+component

In that document if download the file means need to follow the url pattern.

GET /containers/{container}/files/{file}

Example:

I have container1 (container name), and file name lb.png.

So I maked the url like this

http://localhost:3000/api/containers/container1/files/lb.png?access_token=8Hfay0LRU2g22BjCqf3q8HsQCdsVBgBp9MHeekr3LfNLlILVUzUHUsUKOZmjTRD9

I am getting the response for file name, I expect once I use the url in browser means the file should be download into the url.

The response getting:

{
  "container": "container1",
  "name": "lb.png",
  "size": 38780,
  "atime": "2016-03-18T05:13:41.000Z",
  "mtime": "2016-03-18T05:09:06.000Z",
  "ctime": "2016-03-18T05:09:06.000Z"
}

Expected Output:

I need to download the file(lb.png).

1 Answers
Related