How do I get resume to use checksum before filesize?

Upload core product.
Post Reply
lillereven
Posts: 5
Joined: Mon Sep 13, 2010 2:17 pm

How do I get resume to use checksum before filesize?

Post by lillereven »

Hi!

I am currently testing jFileUpload for a project where I need to handle binary files in excess of 2GB. HTTP PUT works fine, and I extended the PHP script to give me the MD5 checksum for the file object on the server.

Due to the filesize and transfer times required for these, I would like to use MD5 checksum for error detection and of course avoid duplicate uploads whenever possible.

So here is my question: How can I tell the resume function to give priority to the checksum rather than filesize? Right now (v2.6) if filesizes match the checksums are ignored. Any solution?


With best regards,
Martin

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: How do I get resume to use checksum before filesize?

Post by support »

In applet:
<PARAM NAME="resume" VALUE="md5">

Is MD5 implemented in the PHP script you have?

lillereven
Posts: 5
Joined: Mon Sep 13, 2010 2:17 pm

Re: How do I get resume to use checksum before filesize?

Post by lillereven »

support wrote:In applet:
<PARAM NAME="resume" VALUE="md5">

Is MD5 implemented in the PHP script you have?
I have the <param> and implemented MD5 in my script. Looking at network traces I see the HTTP HEAD with parameter "checksum: md5". My script replies with HTTP status 200 and checksum: somehexstring.

If checksums don't match but the filesizes do, the applet does not perform an overwrite. Is that intended?


With best regards,
Martin

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: How do I get resume to use checksum before filesize?

Post by support »

If MD5 matches it tries to resume. If not then it should overwrite if you setup:
<PARAM NAME="overwrite" VALUE="true">

Post Reply