Safari Chrome file upload fails with Drupal 6



Filefield (file upload) in Drupal 6 works fine in FireFox, but fails in MAC/Safari or MAC/Chrome.

It throws up following AJAX dump:

{ "status": true, "data": "\x3cdiv id=\"edit-field-photo-0-ahah-wrapper\"\x3e\x3cdiv class=\"form-item\" id=\"edit-field-photo-0-wrapper\"\x3e\n \x3clabel for=\"edit-field-photo-0\"\x3ePhoto: \x3c/label\x3e\n \x3cdiv class=\"filefield-element clear-block\"\x3e\x3cdiv class=\"widget-preview\"\x3e\x3cdiv class=\"imagefield-preview\"\x3e\x3cimg src=\"http://static.tweentribune.com/uploads/imagefield_thumbs/pollen_04-12-10_2.jpg\" title=\"pollen_04-12-10.jpg\" /\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class=\"widget-edit\"\x3e\x3cinput type=\"hidden\" name=\"field_photo[0][APC_UPLOAD_PROGRESS]\" id=\"edit-field-photo-0-APC-UPLOAD-PROGRESS\" value=\"5dbf52e42a6a829c1b041b823b7483c1\" class=\"filefield-progress\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_photo[0][fid]\" id=\"edit-field-photo-0-fid\" value=\"2838\" /\x3e\n\x3cinput type=\"hidden\" name=\"field_photo[0][list]\" id=\"edit-field-photo-0-list\" value=\"1\" /\x3e\n\x3cinput type=\"submit\" name=\"field_photo_0_filefield_remove\" id=\"edit-field-photo-0-filefield-remove\" value=\"Remove\" class=\"form-submit\" /\x3e\n\x3c/div\x3e\x3c/div\x3e\n\x3c/div\x3e\n\x3c/div\x3e\x3cscript type=\"text/javascript\"\x3ejQuery.extend(Drupal.settings.ahah, { \"edit-field-photo-0-filefield-upload\": { \"url\": \"/filefield/ahah/admin_story/field_photo/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-photo-0-ahah-wrapper\", \"selector\": \"#edit-field-photo-0-filefield-upload\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"bar\", \"path\": \"filefield/progress/5dbf52e42a6a829c1b041b823b7483c1\", \"url\": \"/filefield/progress/5dbf52e42a6a829c1b041b823b7483c1\" }, \"button\": { \"op\": \"Upload\" } }, \"edit-field-photo-0-filefield-remove\": { \"url\": \"/filefield/ahah/admin_story/field_photo/0\", \"event\": \"mousedown\", \"keypress\": true, \"wrapper\": \"edit-field-photo-0-ahah-wrapper\", \"selector\": \"#edit-field-photo-0-filefield-remove\", \"effect\": \"fade\", \"method\": \"replace\", \"progress\": { \"type\": \"throbber\" }, \"button\": { \"field_photo_0_filefield_remove\": \"Remove\" } } });\x3c/script\x3e" }



I think this is due to the fact that ajax requests cannot be made in chrome/safari on the same page while an upload is in progress and also any scripts called during an upload may not be called properly.

Something to do with a bug in webKit based browsers.

This is related, I think.

http://drupal.org/node/375914

Been an issue for a year and a half now :-(