Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341034

Summary: [upload] UploadItem#getFileSize() returns higher value than the real file size
Product: [RT] RAP Reporter: Michal Tkacz <Michal.Tkacz>
Component: IncubatorAssignee: Project Inbox <rap.incubator-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Michal Tkacz CLA 2011-03-26 10:45:47 EDT
Build Identifier: 

This is related to bug 289708. Instead of returning the file size, UploadItem#getFileSize() returns the total number of bytes transferred. The size returned is a content length as provided by ProgressListener#update(long,long,int) (see FileUploadServiceHandler class). The size should instead be obtained using FileItem#getSize() once the upload is finished.

Reproducible: Always
Comment 1 Ralf Sternberg CLA 2011-10-10 17:45:14 EDT
The upload widget is obsolete and will be removed in the future. Use the new FileUpload widget or the FileDialog implementation from the incubator instead.