/
[uploader] Remove the HTML4 uploader [5.3.0-B1]

[uploader] Remove the HTML4 uploader [5.3.0-B1]

In-Portal has 2 form blocks, that deal with uploading:

  • inp_edit_upload - shows standard HTML4 uploader (<input type="file"/>)
  • inp_edit_swf_upload - shows modern uploader (in 5.2.x backed by SWFUpload, in 5.3.x backed by Plupload)

I see several problems with this:

  1. the "inp_edit_upload" have no features (e.g. no "image preview", "upload progress bar", "multiple file support") compared to "inp_edit_swf_upload"
  2. the "inp_edit_swf_upload" is named wrong, because it no longer uses Flash, but rather HTML5
  3. we always need to put these 2 lines on every page, where "inp_edit_swf_upload" needs to be used: 

    <script src="js/swfobject.js" type="text/javascript"></script>
    <script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>

Solution

  1. delete the "inp_edit_upload" control
  2. rename the "inp_edit_swf_upload" control to "inp_edit_upload" control
  3. include above mentioned JS files automatically once-per-page right in the "inp_edit_upload" block

Related Tasks