If you were to upload an image with a file name of “filename.jpeg”, for example, then you would then point to that file in an Image component with /filename.jpeg.
We do not currently have any way for Perspective to take a picture with a mobile device (outside of scanning a barcode, which does not actually save a file to your device). A “Picture” action is something we’re considering in later versions, but it’s not even in a planning stage yet.
Although, at least some browsers (mobile Safari in particular I know does this) allow you to directly take a picture when prompted to upload a file. It’s up to your device and browser whether to prompt for this, so it’s worth trying different browsers and looking into device settings.
@cmallonee
the folders/directories in webserver\webapps\main seems to be forbidden to acces in the browser (error 403) i can acces the images inside it, but i would also like to acces the whole folder itself
is there somewhere where i can allow it? (some htacces config or something?)
in the webserver/webdefault servlet file the dirAllowed is already true so not sure where else it could be
edit:
ah nvm i found it webserver\webapps\main\WEB-INF\web here it stood on false
Hi @cmallonee
I use your code and it work perfectly the only problem is the image component cache the old image and if I change the image it show the old one always.
It seems perspective cache every thing. Is there any way to disable caching for image component?
I am curious if there is a way to get the file path from this component. This way It would be easier for the users, and it would be less changes to code I already have set up.
Currently I am storing the contents of the file in a custom tag property on the main view, then I can read it in that way. But I do not like having to import two libraries if I can help it.
What file path? From the client browser? That would be a security hole in the browser.
If you mean the folder path in the gateway, then it is always a temporary folder, and the file name used in that folder is not under your control. If you don't handle the file in the uploaded event with the supported accessors, the content will be discarded.
It is wise to put the file somewhere other than gateway RAM if uploads are expected to be large. (Perspective properties all use gateway RAM.)
As of now when I/others need to make an edit using a CSV file I made a text component and just read the file path from that component into the csv python with open() aspect. I just hold shift on the file then right click and select copy as path to get: