Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1331

Integrate Plupload

    XMLWordPrintable

    Details

    • Change Log Group:
      Changed
    • Change Log Message:
      Replacing SWFUpload file upload solution with Plupload.
    • Story Points:
      2
    • Sprint:
      In-Portal's 4th Sprint
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

    • Commit Revision:
      16,002
    • BC Break Details:
      Hide

      The output format for "OnUploadFile" event was changed from Plain-text to JSON.

      Solution

      1. add new "uploader_type" optional setting to "_install/theme.xml" in theme
      2. add "UploaderType" field to "theme" unit/db table:
        1. options: swfupload - SwfUpload, plupload - Plupload
        2. default: swfupload (to preserve BC)
      3. in the "kThemesHelper::refreshTheme" method populate value of "UploaderType" field of the created theme with value of "uploader_type" setting, when found in "theme.xml"
      4. for "kUploadHelper::handle" method:
        1. add optional "$form_field" parameter, that will be set to "file" value, when not given
        2. use value given in "$form_field" parameter instead of hardcoded "file" value in this method and method it calls internally ("getUploadedFilename", "moveUploadedFile")
      5. in the "OnUploadFile" event:
        1. return results in Header+Text format (former code) when we're on Front-End and "UploaderType" theme setting is set to "swfupload" value
        2. return results in JSON format (current code) in all other cases
      Show
      The output format for "OnUploadFile" event was changed from Plain-text to JSON. Solution add new "uploader_type" optional setting to "_install/theme.xml" in theme add "UploaderType" field to "theme" unit/db table: options: swfupload - SwfUpload, plupload - Plupload default: swfupload (to preserve BC) in the "kThemesHelper::refreshTheme" method populate value of "UploaderType" field of the created theme with value of "uploader_type" setting, when found in "theme.xml" for "kUploadHelper::handle" method: add optional "$form_field" parameter, that will be set to "file" value, when not given use value given in "$form_field" parameter instead of hardcoded "file" value in this method and method it calls internally ("getUploadedFilename", "moveUploadedFile") in the "OnUploadFile" event: return results in Header+Text format (former code) when we're on Front-End and "UploaderType" theme setting is set to "swfupload" value return results in JSON format (current code) in all other cases

      Description

      Integrate Plupload v2.0.0 uploader (see http://plupload.com/) to replace SWFUpload, that we're using right now.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: