Can't download files using both API Docs and REST API


#1

Hey,

I can’t download files from directories either using API Docs or the REST API.

Download from /api/v2/files/ is OK but from an inner directory, it gets error 404.

  • download “/api/v2/files/photo.jpg” --> response code: 200 OK

  • download “/api/v2/files/test/photo.jpg” --> response code: 404 NOT FOUND


#2

I’m getting the same problem here…tried to put the folder path in public paths in service configuration, still no success


#3

I filed this as a bug yesterday. It looks like it only affects API Docs. Try making the call with another rest client, like Postman.
If the call doesn’t work, please share your error information.


#4

It doesn’t only affect API Docs, I can’t turn paths into public paths.

Config:

Postman return:


#5

Actually Postman worked for me. As I can see in your screenshot it seems your Postman error is because of missing X-DreamFactory-Session-Token since you’ve provided only one header.

But still not working in API-Docs and REST API.


#6

I’m trying to set public paths to files, and public paths have to work without any headers. Even if I set a path as public in the file service config the path is not becoming public. Why is that?

Thanks


#7

Public paths are for use in the browser, not for regular API calls. To access them them, you need to point your browser to

http://yourdreamfactoryurl/files/publicfolder

no api/v2