Ensure an absolute URL is returned from the file upload service

Review Request #8858 — Created March 29, 2017 and submitted

Information

Review Board
release-3.0.x
361761c...

Reviewers

The FileUploadService in Djblets cannot determine the full URL of
media hosted locally and so will return relative URLs. We specialize
this service in Review Board to prepend the request method and domain to
relative URLs to make them absolute.

  • Ran unit tests.
  • Manually tested uploading avatars.
Description From Last Updated

Too many blank lines.

chipx86chipx86

This is probably best on the class.

chipx86chipx86

Let's change this to say "Return an absolute URL for the given URL" or something. "Ensure" doesn't really say that …

chipx86chipx86

Missing backtick at the end of the reference.

chipx86chipx86

Swap these.

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/avatars/services.py (Diff revision 1)
     
     
    Show all issues

    This is probably best on the class.

  3. reviewboard/avatars/services.py (Diff revision 1)
     
     
    Show all issues

    Let's change this to say "Return an absolute URL for the given URL" or something. "Ensure" doesn't really say that it's going to normalize and return something. It could be validating or wanting to modify something in-place.

  4. reviewboard/avatars/services.py (Diff revision 1)
     
     
    Show all issues

    Missing backtick at the end of the reference.

  5. reviewboard/avatars/tests.py (Diff revision 1)
     
     
     
    Show all issues

    Swap these.

  6. 
      
brennie
chipx86
  1. 
      
  2. reviewboard/avatars/services.py (Diff revisions 1 - 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Too many blank lines.

  3. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (fda91a7)