Closed
Bug 731089
Opened 13 years ago
Closed 13 years ago
adjust addon icon to move logic out of apache and into python
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
addons.mozilla.org Graveyard
Public Pages
Tracking
(Not tracked)
VERIFIED
FIXED
6.4.4
People
(Reporter: clouserw, Assigned: clouserw)
References
Details
Check out these rewrites in our current .htaccess:
> # Short (<3 digits) get funneled into /0/
> RewriteRule ^([^/]+/[^/]+/|)images/addon_icon/(\d{1,3})-(32|48|64).png /img/uploads/addon_icons/0/$2-$3.png [L]
> RewriteRule ^([^/]+/[^/]+/|)images/addon_icon/(\d{1,3}).png /img/uploads/addon_icons/0/$2-32.png [L]
>
> # Everyone else gets processed into another dir
> RewriteRule ^([^/]+/[^/]+/|)images/addon_icon/((\d*?)\d{1,3})-(32|48|64).png /img/uploads/addon_icons/$3/$2-$4.png [L]
> RewriteRule ^([^/]+/[^/]+/|)images/addon_icon/((\d*?)\d{1,3}).png /img/uploads/addon_icons/$3/$2-32.png [L]
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} /img/uploads/addon_icons/+\d*.png$
> RewriteRule (\d+)\.png$ /img/uploads/addon_icons/0/$1.png [L]
We should move that path logic into the python code at addons.models.get_icon_url.
You can see we already moved the same logic for user images into python in users.models.picture_url. This should be very similar (or the same?) as that.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → clouserw
Assignee | ||
Comment 1•13 years ago
|
||
https://github.com/mozilla/zamboni/commit/959cd5eede8d429bf524c4f480fc1ec903c2cd08
Note:
-ADDON_ICON_URL = ('%s/images/addon_icon/%%d-%%d.png?modified=%%s' %
- STATIC_URL)
+ADDON_ICON_URL = STATIC_URL + '/img/uploads/addon_icons/%s/%s-%s.png?modified=%d'
QA:
You shouldn't notice any changes. If icons aren't appearing or are 404s let me know.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 6.4.4
Comment 2•13 years ago
|
||
I checked
- screenshot upload from submission/manage pages
- Adding/replacing user profile pics
- Adding collection icons
- Deleting screenshots
Everything seems to be working just fine.
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•