I'm developing a Firefox OS app that allows selecting an image from the device
(camera or gallery) with:
var activity = new MozActivity({
name: "pick",
data: {
type: ["image/png", "image/jpg", "image/jpeg", "audio/mpeg" ]
}
});
and then uploads that, via XMLHttpRequest, to a local server that expects the
file field to be 'upfile'. I send the file with:
var formData = new FormData();
formData.append('upfile', selectedFile, filename);
But, no matter what set the third parameter to, the file ends up on the server
with the default name of 'blob'.
The Bugzilla report at https://bugzilla.mozilla.org/show_bug.cgi?id=690659
suggests that this was a bug that has been fixed in Firefox 22.
I don't understand enough about the Firefox OS schedule to understand when I
can expect that bug to make it's way through to Firefox OS. Can someone point
me in the right direction?
Also, can anyone suggest a workaround I can use in the meantime? I have no
control over the server-side, so I cannot, for example, send the filename as
another field.
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps