Hey so I'm using the Multiple File Upload component from the forge, and I was wondering if there is a way to loop over the files the user selects or drags and drops so I can send them straight to our Amazon S3 account.
By default, this component uploads the files to a temp entity on the server where I can then loop over them and send them to Amazon S3. But I was thinking that if there was a way to bypass the temp entity storage and instead just send them directly to Amazon that it would be more efficient this way, since the file would only have to be transferred from the client to Amazon, rather than from the client to outsystems and then from outsystems to Amazon. Hopefully that makes sense, any help or thoughts on the issue would be greatly appreciated.
So I'm trying to use the OnNotify screen action as seen here:
Rather than using the "FileProcessURL" so that I can just bypass the temp table storage and capture the file(s) the user has selected and pass them over to our Amazon S3 server. Inside the OnNotify screen action I'm trying to use the MultipleFileUpload extension action to get the Filename, Type and Contents as seen here:
But as you can see in the screenshot above, the extension action GetRequestFile is returning the webpage instead of the file the user selected. If the user selects more than one file the OnNotify runs multiple times for each file, and for testing I added the NotifyGetMessage action to see what it returns and it actually returns the name of the file I've selected. If the GetRequestFile action returns the what I needed this would work perfectly. Any thoughts?
your approach doesn't work because you are using it inside a action with ajax submit! So it will never capture the files from the request.
But if your goal is to send the files to amazon, I will suggest you to instead of sending them to the temp file like the examples is currently doing. You just need to change the ProcessFiles screen preparation, and replace the CreateUploadCache server action by your method to store the file in the amazon.
Hi Hugo, yeah I've thought about doing that, I was hesitant to do it because I didn't want to change the forge component so it would be easier to upgrade it in the future, I was hoping there would be a supported way to do what I'm trying to do outside of the component. But if that is the only way then I will do it that way. Unless you are saying to create my own local processfile aspx page in my application and point the component to it instead of the internal one. Which if that would work that would be cool.
Thanks for the reply!!
Hugo Pinheiro wrote: