Storing Uploaded Files to Dedicated Server Location

0
Hi all, When files are uploaded from a form, they are stored securely on the server in a hashed location in a unreadable format (humanly speaking). In order to get back the original file, one must access the GUID URL using the following format: AppURL/file?guid=xxxx. Files uploaded through the modeler can be accessed in this way: AppURL/img/moduleName$fileName. Is it possible to setup a microflow or something that can (along with the normal file upload processes) store uploaded files in the /img folder or another folder (say, a custom folder) on the server?
asked
3 answers
3

Ok, it's still the same concept. The files themselves will never be physically stored in that directory, but you can expose them via an /img/ path. Look at the java code for the deeplink module, specifically how it registers a request handler for /link/

Here's an older blog post on the concept as well. In your request handler, you should read the parameter passed in the URL, then use that to execute an XPath query to retrieve your image entity. You could return that image as the request response. This is all possible without an established session.

answered
0

To clarify, you want a way to be able to access uploaded files using a custom URL? This would be a perfect use case for the DeepLink module - check it out on the app store.

answered
0

Doesn't the FileFromFileDocument from the CommunityCommons module do exactly what you want? We currently use this to store filedocuments on a folder (on prem) location, you can define the path yourself (and save it somewhere to be able to retreive it via the FileDocumentFromFile action)

answered