URL of uploaded Image


#1

Hello,

I uploaded an image file using the DSP. There is a REST API to getFile, but it seems that this is a download. Can the DreamFactory server serve an uploaded image as a URL? I would like to be able to show the uploaded image on a mobile device without having to download it first.


#2

Hi,

Yes, this is possible. Simply navigate to your Local File Storage service and press the folder icon beside it. This will take you to your internal file store.

In my scenario, I’ve uploaded a file “capture.jpg” to the folder I created “mark” -

I am now able go to this URL: http://localhost/files/mark/capture.jpg and it auto-loads.

Thanks,

  • Mark

#3

Mark,

Thanks for the info. The URL works. If this is the case though, in DF, the files system does not follow the apps security settings. I was hoping there was an api that I could pass a resource id and depending on whether the users session passes authentication, the files gets served dynamically. (I logged out from my DSP session on the browser and the URL still serves the image)


#4

Okay - so that is a different scenario. Can you tell me if after you close your browser cache the image still loads?

Thanks,

  • Mark

#5

Here is the image URL

http://df.systemacorp.com/files/applications/test/harold.png

I cleared cache and it is still accessible. I also have not set any Roles with a System Access to Local File Storage.


#6

Yeah, I just pulled it up actually. This is something that we’re looking into right now - Please talk with me directly about this at support@dreamfactory.com

Thanks,

  • Mark