1 (edited by BigTitus 2010-06-08 12:22:28)

Topic: Get no file on server with HTML5 in Safari and older Chrome versions

Hi!

First I would like to thank you for this great tool and especially for sharing it!

Now the problem:
With Firefox everything is working fine but when using Safari e.g. (which means the function sendAsBinary cannot be used) I don't receive any file on server side. I'm using RoR and with FF I can access the params[:file] object. But with Safari or an older Chrome version this parameter is empty.

Do I have to access the file another way? Or am I missing something else?

Thanks in advance for any hint!

Re: Get no file on server with HTML5 in Safari and older Chrome versions

You need to intercept both mutlipart and a binary stream to have webkit support. WebKit doesn't support mutlipart in HTML5, Chrome 6 will have this support but it hasn't been released yet.

Check the upload.php file as a reference.

Re: Get no file on server with HTML5 in Safari and older Chrome versions

Got it. In Rails you can access file data with

request.body.read

Thank you for pointing me in the right direction!