Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » FileUpload with result possible?(How to determine, whether the file upload actually worked)
FileUpload with result possible? [message #1860864] Wed, 06 September 2023 15:57
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 49
Registered: May 2016
Member
Hi,

in our application we use the FileUpload component to upload a file or files to our backend application server.
Our RAP-based web-application has a filter configured, which will scan for both the actual file type of whatever is to be uploaded and also can submit the data that is uploaded to a malware scanner. We use clamav.
Only when the uploaded data passes the scan, the filter will forward the data to the URL of the upload service handler.
If it does not pass, the filter will send an error reponse with status code 406.

It would be nice, to be notified by the FileUpload widget that the upload attempt failed. Because a call to the form submit() method seems to be used to upload the file, the response is lost, though.

Wouldn't it be possible to implement the FileUpload using the fetch() api instead? This would return the response in a promise !?

An alternative approach in our case would be to install a second service handler in the servlet where a "bad" request might be redirected to or to add some header to the filtered request which would tell the service handler that the payload is infected.

What do you think?

Best regards
Gunnar Adams





Previous Topic:Clipboard vs. JEE_COMPATIBILITY
Next Topic:How to disable Jetty Host SNI validation check for HTTPS Connection
Goto Forum:
  


Current Time: Sat Jul 27 01:54:18 GMT 2024

Powered by FUDForum. Page generated in 0.03440 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top