gonuldas / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

CacheableFileItem returns too big byte array #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Use AppEngineUploadAction
2.Upload a file
3.In method executeAction: System.out.println(sessionFiles.get(0).get().length) 

What is the expected output? What do you see instead?
Size of uploaded file in bytes. Bugged value.

What version of the product are you using? On what operating system?
0.6.4, Ubuntu 10.04, AppEngine Dev Server 1.6.3

Please provide any additional information below.

It is cause by wrong implementation of CacheableFileItem.getData(). It reads 
byte array from cache and does not limit its size. Correct size can be obtained 
from getSize(), so I can correct byte array manually. 

Original issue reported on code.google.com by jtgaw...@gmail.com on 7 Apr 2012 at 11:00

GoogleCodeExporter commented 8 years ago
Could you send a patch?

Thanks
- Manolo

Original comment by manuel.carrasco.m on 23 May 2012 at 4:15

GoogleCodeExporter commented 8 years ago
Fixes:
 - correct size after getData()
 - added merging file parts in read()

Original comment by jtgaw...@gmail.com on 30 May 2012 at 1:24

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r994.

Original comment by manuel.carrasco.m on 1 Jun 2012 at 9:57

GoogleCodeExporter commented 8 years ago
Thanks for contributing 
- Manolo

Original comment by manuel.carrasco.m on 1 Jun 2012 at 9:58

GoogleCodeExporter commented 8 years ago

Original comment by manuel.carrasco.m on 30 Nov 2012 at 9:17