Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#15911 closed enhancement (fixed)

dojox.form.Upload should send used method / plugin

Reported by: minobun Owned by: Mike Wilcox
Priority: undecided Milestone: 1.9
Component: DojoX Uploader Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:


The uploader need different server-side code to handled correctly. By default the HTML5 plugin is used which can handle json result directly. If it fall back to IFrame (mostely for IE) the json result has to be wraped in a <textarea> tag.

With multiple = true this can be determined server-sided with the following PHP code:

$type = FALSE;
if (isset($_FILES['uploadedfiles'])) {
  $type = "html5";  // we can result pure JSON
if (isset($_FILES['uploadedfile0'])) {
  $type = "iframe";  // we need to wrap <textarea>JSON</textarea>

For multiple = false there is no way to know how it was sended and how we could send the correct result. A workaround for this is to set multiple to true.

But maybe the plugin used for uploading should transmitted as get/post parameter.

Change History (2)

comment:1 Changed 9 years ago by Mike Wilcox

Resolution: fixed
Status: newclosed

In [30332]:

Fixes #15911 - added uploadType to uploads

comment:2 Changed 9 years ago by Mike Wilcox

Milestone: tbd1.9

I added uploadType to the uploads. It will be a string of either html5, flash or iframe.

Note: See TracTickets for help on using tickets.