Ensure an absolute URL is returned from the file upload service

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

brennie
Review Board
release-3.0.x
8843
361761c...
reviewboard

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)
     
     

    This is probably best on the class.

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

    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)
     
     

    Missing backtick at the end of the reference.

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

    Swap these.

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

    Too many blank lines.

  3. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (fda91a7)
Loading...