rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: danjag on June 28, 2012, 02:43:09 PM

Title: BUG: Uploaded file gets zero size
Post by: danjag on June 28, 2012, 02:43:09 PM
Hello,

I am developing a http upload procedure for a program, and wanted a simple storage solution on the server side (HFS!!)   
I use a POST multipart/form-data message in my procedure and all seems fine, except that the file created in the upload directory has zero byte size...
I really pulled my hair trying to resolve this issue which I thought was caused by my code...

But, now I think that the problem lies within HFS...

I can reproduce the problem with the upload function in HFS.
  1. Open link to your HFS upload directory in a browser
  2. Click on the UPLOAD link in the index page
  3. Browse for some simple text file and put it in all 10 input fields
  4. Press the Upload files button
  5. 10 files are created but the *last* file has zero size:

test.txt: OK --- 62 B (Speed 26 KB/s)
test (1).txt: OK --- 62 B (Speed 21 KB/s)
test (2).txt: OK --- 62 B (Speed 35 KB/s)
test (3).txt: OK --- 62 B (Speed 52 KB/s)
test (4).txt: OK --- 62 B (Speed 52 KB/s)
test (5).txt: OK --- 62 B (Speed 35 KB/s)
test (6).txt: OK --- 62 B (Speed 52 KB/s)
test (7).txt: OK --- 62 B (Speed 42 KB/s)
test (8).txt: OK --- 62 B (Speed 35 KB/s)
test (9).txt: OK --- 0 B (Speed 27 KB/s)

An even easier way to reproduce the problem is to use the *last* input field only:

test.txt: OK --- 0 B (Speed 8 KB/s)
 

The problems seems to be that the *last* part file in the multipart message don't get written/flushed to the disk!

In my case the last part is the *only* part I send in my message.

I did another upload test using Fiddler2, where I composed a POST file upload.
The result was the same - the *only* file sent got zero size. 

Regards, Dan
Title: Re: BUG: Uploaded file gets zero size
Post by: rejetto on June 29, 2012, 10:57:51 AM
welcome Dan!
it's like you are using HFS 2.2
would you mind testing version 2.3 ? (still in beta, but good to go)
Title: Re: BUG: Uploaded file gets zero size
Post by: danjag on August 06, 2012, 08:36:38 AM
Everything seems to work as expected in HFS 2.3 Beta  :)
Thanks !