URL for Public Access to Files


#1

Hi
I have DF up and running, and my IOS app posts to a folder.

My files are posted to /opt/bitnami/apps/dreamfactory/htdocs/storage/app/myfolder (which is my subfolder under files).

I would like to be able to access these publicly by URL so i can send as mms using Twilio.

I have set the config in the file services ‘public folder’ setting as app and experimented with various things in the public path but cant get it to work.

Ideally I would like to be able to access the files as say mysitename.com/myfolder/myfilename.jpg

Any clues?


#2

I have figured out part of the problem, which was that the path should be mysitename.com/files/myfolder/myfilename.jpg I hadn’t included the files service.

Would appreciate any advice. Do I need to do anything with roles to allow public acces?

I have the photis in the files folder (which is app).

I have the public path set to myfolder and the rootfolder is app. I can see that the file with the correct name is in the directory /opt/bitnami/apps/dreamfactory/htdocs/storage/app/

I now get the "Whoops, looks like something went wrong. " which is progress. In the logs, I can see the error

[2018-02-24 20:44:37] local.INFO: [REQUEST] Storage {“Method”:“GET”,“Service”:“files”,“Path”:“myfolder/myfilename.jpg”}
[2018-02-24 20:44:37] local.INFO: [RESPONSE] File stream
[2018-02-24 20:44:37] local.ERROR: The specified file ‘myfolder/myfilename.com’ was not found in storage. {“exception”:"[object]
(DreamFactory\Core\Exceptions\NotFoundException(code: 404): The specified file ‘myfolder/myfilename.jpg’ was not found in storage.
at /opt/bitnami/apps/dreamfactory/htdocs/vendor/dreamfactory/df-file/src/Components/LocalFileSystem.php:593)"}


#3

Hi
Did you solve this? I can’t get the path public/name_of_folder/file to work, it just says ‘Access denied, refer to administrator’
Public path is opened on the correct location etc.
Thanks
M