Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » check size and format before FileUpload
check size and format before FileUpload [message #1485046] Mon, 24 November 2014 00:54 Go to next message
David Lee is currently offline David LeeFriend
Messages: 52
Registered: May 2013
Member
Hi,

Can FileUpload plugins check the size and format of files before being uploaded on RAP3 final release in December? If yes, it'll be wonderful, if not, are there any alternative methods doing that?
Thank you!


Best Regards,

David
Re: check size and format before FileUpload [message #1485411 is a reply to message #1485046] Mon, 24 November 2014 08:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2327
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi David,
currently, file upload checks the size during the upload and throws an
exception if maxFileSize is exceeded. I don't think it's possible to do
it before the upload starts (browser security restrictions). What do you
mean by checking format? Add filter to show for selection only files
with given extension? See bugs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=433501 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=414459 for more details.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: check size and format before FileUpload [message #1490144 is a reply to message #1485411] Fri, 28 November 2014 00:38 Go to previous messageGo to next message
David Lee is currently offline David LeeFriend
Messages: 52
Registered: May 2013
Member
Hi, Ivan,

Thank you, I tried setFileSizeMax and it works, but a little pessimistic because users still have to wait until uploading proceeds and fails, if it stops in the very beginning of uploading, could be better, that can reduce server loading and boost efficiency!
Uploading seems to be processed inside org.apache.commons.fileupload.servlet.ServletFileUpload, is it possible to show a message when file size exceeded ? if yes, how or where to put the message code?


Best Regards,

David

[Updated on: Fri, 28 November 2014 02:26]

Report message to a moderator

Re: check size and format before FileUpload [message #1490430 is a reply to message #1490144] Fri, 28 November 2014 06:19 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2327
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
unfortunately no... See this bug:
[FileDialog] File Dialog accepts filtered file name extension
https://bugs.eclipse.org/bugs/show_bug.cgi?id=414459
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: check size and format before FileUpload [message #1490537 is a reply to message #1490430] Fri, 28 November 2014 08:19 Go to previous messageGo to next message
David Lee is currently offline David LeeFriend
Messages: 52
Registered: May 2013
Member
Hi, Ivan,

Thank you for reply!

Best,
David
Re: check size and format before FileUpload [message #1803573 is a reply to message #1490144] Mon, 04 March 2019 18:17 Go to previous message
Vincenzo Caselli is currently offline Vincenzo CaselliFriend
Messages: 227
Registered: January 2012
Senior Member

Hi David,
did you find any workaround for checking file size before uploading?

We have the same problem about reducing server workload and we hope in some sort of javascript checking before uploading.

Thank you very much.
Vincenzo
Previous Topic:How to obtain country of a client connection?
Next Topic:download service servlet error on Tomcat 8
Goto Forum:
  


Current Time: Mon Dec 16 13:01:35 GMT 2019

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

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

Back to the top