Text file detected as binary when using REST addFile

XMLWordPrintable

    • Severity 3 - Minor
    • 1

      Text file which contains character code >127 is treated as binary files when it's added to review using REST addFile. That causes "Download revision ..". link to appear instead of text to be displayed.

      As workaround file content type 'text/plain' can provided during file upload. Which means instead of

      curl -v http://localhost:6060/foo/rest-service/reviews-v1/CR-1/addFile -u user:password -F "file=@CU94745.CBL"

      we can use

      curl -v http://localhost:6060/foo/rest-service/reviews-v1/CR-1/addFile -u user:password -F "file=@CU94745.CBL;type=text/plain"

      . Note ;type=text/plain difference.

              Assignee:
              Unassigned
              Reporter:
              Cezary Zawadka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: