Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-16328

CLONE Cloud - Upload new version with different file (mime) type does not update properties or .extension

    Details

      Description

      Requirements


      As an end user I want Alfresco to handle changes in filenames and Mimetypes gracefully so that when a new version is created that has a different file extension and/or a different Mimetype the transforming does not fail and downloads by other users can be opened easily.

      Acceptance Criteria

      • Upload new version action goes straight to the file selection dialog in the users OS
      • There is no dialog where the user has to click Select button to choose the file to be uploaded
      • After the user has chosen a file a dialog appears
      • The dialog contains:
        • Title: "Uploading: <filename.ext>"
        • There is a X top right corner which closes the dialog, no changes are made
        • There are two columns, first labeled "Current File", second labelled "New File"
        • Under Current File these properties are listed: Current version, Filename.ext, Title, Mimetype, Last modified by and when
        • Under Current File an image is displayed that represents the mimetype
        • Under New File the Filename of the file being uploaded is displayed
        • Under New File the Mimetype of the file being uploaded is displayed (assumed from the file extension
        • Under New File the user is given the choice of whether the new version number will be a minor increment or a major increment
        • Under New File an image is displayed that represents the mimetype
        • There is a "Comments" text box which the user can enter comments into
        • There is a button called "Add this file as a new version"
        • There is a "Cancel" button
      • The Cancel button closes the dialog, no changes are made
      • The Add this file as a new version to the existing file button does the following:
        • If the filename is identical to the current version then the content is updated in the repository, the version number is incremented as per the users choice and any comments inputted are saved (i.e. what happens today), including updating the modified date & by
        • Where the filename is not identical then update the content, filename and mimetype in the repository also the version number is incremented as per the users choice and any comments inputted are saved (i.e. what happens today), including updating the modified date & by
      • The default selection is the Add this file as a new version button, so pressing enter key will trigger that button

        Original Text


        Steps to reproduce:
        1) upload powerpoint file.
        2) go to the powerpoint file document details page
        3) upload new version and select a word document
        3) refresh page and see increased version number and word document content
        4) Download file and try to open
        5) edit document properties and change mime type to word
        6) Download file and try to open
        7) Rename file and change extension from .pptx to .docx
        8) Download file and try to open
        9) upload new version of word doc
        10) revert to pptx version
        11) Check properties (also reverted to match the version reverted), however file name remains as .docx

      Expected behaviour
      As a minimum, so that transforms are not adversely affected, when uploading a new version, the MIME type should be checked and reset if needed - so that the transformations are attempted for the correct mime type and do not consume large resources trying to use the wrong conversion method.
      As a possible improvement, it should also change the file name extension to match and record this as part of the version properties, so that it could be reset if the version is reverted... though this mainly seems to impact users that download the content not being able to open the file as the file format does not match the name.extension, so the client tries to open the file with the wrong application.

      Actual result:
      The files are uploaded and the mime-type doesn't change when the document format changes and the extension remains, causing the documents to be downloaded with the wrong extension, so that cannot be opened, and transforms attempted for the wrong mime-type.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alfrescoqa Alfresco QA Team
                Reporter:
                jknowles John Knowles
              • Votes:
                3 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m