2269: Allow inline review for non-text file types

wangxiao*********@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
June 23, 2014
3025
http://reviews.reviewboard.org/


What version are you running?
1.6 RC2

What's the URL of the page this enhancement relates to, if any?


Describe the enhancement and the motivation for it.
user can add a file to review. In 1.6 RC2, usre can only add a file, but reviewers cant't reiview this file like view diff.

my requirement is submiter can mark the file as need to review or not, while upload the file. if mark as need to review, reviewer can see it in view diff, the file can display as newcontent, and reviewer can add comment.

What operating system are you using? What browser?
Red Hat Enterprise Linux Server release 5.4 (Tikanga) 64
IE8 、 firefox 、 chrom

Please provide any additional information below.
david
#1 david
Can you clarify which file types you'd like to be able to review?
  • +NeedInfo
#2 wangxiao*********@gmai***** (Google Code) (Is this you? Claim this profile.)
all files(.txt .java .c .h .php .js .css .xml .py .sh .pl etc) expect Binary files and pictures
david
#3 david
  • -NeedInfo
    +New
  • +Allow inline review for non-text file types
david
#4 david
  • +Component-ReviewUIs
#6 ymi****@gmai***** (Google Code) (Is this you? Claim this profile.)
Uploaded java, properties, or Perl files appear in database with appliaction/octec-stream mime type and can only have comments at the file level. I am looking to be able to review these files as any other text file.
chipx86
#7 chipx86
ymikhel: What version of Review Board?

Modern versions will run `/usr/bin/file --mime-type -b` on the uploaded file and attempt to guess the mimetype that way. If that can't be run, or you're running an old version of Review Board, you're out of luck.
  • -New
    +New
#8 ymi****@gmai***** (Google Code) (Is this you? Claim this profile.)
2.0.2
#9 ymi****@gmai***** (Google Code) (Is this you? Claim this profile.)
I also see different results using different browsers, for example with IE Java and properties files get uploaded as text/plain files, but not with Chrome. Perl files are uploaded as application/octec-stream in all browsers.
chipx86
#10 chipx86
ymikhel: I have a fix for this coming in 2.0.3, but this bug report is unrelated to the bug you have. Because the requested feature was implemented in 2.0, I'm closing this as fixed.
  • -New
    +Fixed
  • +chipx86
#11 ymi****@gmai***** (Google Code) (Is this you? Claim this profile.)
Not sure I understand why this report is unrelated to the bug I have. The bug I have is:

"Uploaded java, properties, or Perl files appear in database with appliaction/octec-stream mime type and can only have comments at the file level. I am looking to be able to review these files as any other text file."
chipx86
#12 chipx86
The original report was about adding a feature to do review of text files, which we did not have before. We never closed the bug when we added it. It should have been closed.

Your bug is a browser compatibility issue with file attachment mimetypes that prevented the text review from working, but that's a different thing than the original feature request.
#13 ymi****@gmai***** (Google Code) (Is this you? Claim this profile.)
Yes and no. My bug is about not being able to review java and perl files as text files. I found a workaround for java files using IE to upload them, but perl files get uploaded as application/octec-stream with all the browsers I tested - IE, Chrome, FF, Opera and Safari.