[Dojo-interest] Dojo iframe load is not called

28 views
Skip to first unread message

aresot

unread,
Dec 12, 2011, 7:29:03 PM12/12/11
to dojo-i...@mail.dojotoolkit.org
Im uplaoding file to Amazon S3 using dojo.io.iframe.send:

var d = dojo.io.iframe.send ({
url: url,
contentType: "multipart/form-data",
method: "POST",
form: this._form.domNode,
handleAs: "text",

load: dojo.hitch(this, function (respText) {
alert(1)
this.showLoading(false);
this.onSuccess(this.nodeFormName.value);
}),
error: dojo.hitch(this, function (err) {
console.log("err", err)
this.showError(err);
})
}, true);
I can see via using sniffer that file upload finished (and file is indeed in
S3 bucket) but "load" or "error" callback functions are never called. Via
sniffer I can see that response code is 204 "no content" and I assume that
it may be root of the problem. Anyone had similar problem or know how to
solve it?

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-iframe-load-is-not-called-tp3581110p3581110.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Karl Tiedt

unread,
Dec 12, 2011, 7:35:42 PM12/12/11
to dojo-i...@mail.dojotoolkit.org

In order for iframe io to properly handle callbacks the server must return a response that contains a single textarea that contains the response value... Otherwise dojo has no reliable way to track the status properly

aresot

unread,
Dec 12, 2011, 7:39:46 PM12/12/11
to dojo-i...@mail.dojotoolkit.org
I guess there is no way to check header in iframe to see if its 204 return
code?

Since its Amazon S3 server (i have no control over what it returns), is
there any other way to upload file there?

Thanks.
Andrei

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-iframe-load-is-not-called-tp3581110p3581130.html

Jared Jurkiewicz

unread,
Dec 12, 2011, 8:17:13 PM12/12/11
to dojo-i...@mail.dojotoolkit.org
There is no way to access response headers of an iframe, or the
document status code.

Sincerely,
-- Jared Jurkiewicz

Reply all
Reply to author
Forward
0 new messages