Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2366

Upload via REST results in corrupted file

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide
      1. Enrich Wildfly 8.1.Final installation with Modeshape 4.0.0.Final kit
      2. create a user with wildfly/bin/add-user.sh, and do other stuff with roles
      3. issue a following curl command:
        1. curl -X POST -d @pathToSomePicture.png --user someUserName:hisPassword http://localhost:8080/modeshape-rest/sample/default/upload/thePictureName.png
      4. download uploaded the file
      5. see that it has bigger size and is corrupted, can not be opened
      Show
      Enrich Wildfly 8.1.Final installation with Modeshape 4.0.0.Final kit create a user with wildfly/bin/add-user.sh, and do other stuff with roles issue a following curl command: curl -X POST -d @pathToSomePicture.png --user someUserName:hisPassword http://localhost:8080/modeshape-rest/sample/default/upload/thePictureName.png download uploaded the file see that it has bigger size and is corrupted, can not be opened

      Description

      Uploading a file via RESTful URL:
      http://localhost:8080/modeshape-rest/repository/workspace/upload/somePath/binaryFile.png

      is done without any error, however, subsequent downloading and checking the file results with downloading a corrupted file.

      Note that the MIME type of the picture is recognized correctly to image/png.

      Please see also the forum reference, where it is said that uploading the same files with standard JCR modeshape API works correctly.

        Attachments

          Activity

            People

            Assignee:
            hchiorean Horia Chiorean (Inactive)
            Reporter:
            jhuska Juraj Húska (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: