Closed
Bug 480033
Opened 17 years ago
Closed 17 years ago
Add generic file name to add-on permalink URLs
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
5.0.4
People
(Reporter: wenzel, Assigned: jbalogh)
References
Details
Attachments
(1 file)
|
2.56 KB,
patch
|
clouserw
:
review+
|
Details | Diff | Splinter Review |
Per bug 437681 comment 22:
The Permalinks for add-ons do not carry an .xpi file name anymore, because a file name is always associated with a specific version.
This has an influence on right-click -> save, which will not suggest saving it as a .xpi file anymore. Therefore we should probably add a more generic file name to the permalink URL. Suggestion off the top of my head: "addon-1234-latest.xpi", or something containing the name of the add-on (minus special characters) maybe.
Comments?
Comment 1•17 years ago
|
||
I like the addon-1234-latest.xpi idea. Doing the name of the add-on is prolematic because some add-ons are all "special characters." We run into that problem right now with file names and underscores.
Can we add the version of the add-on instead of "latest"?
We could also use the add-on type instead of "addon" if we wanted, e.g. langpack-1234-latest.xpi or theme-1234-3.1.xpi
| Reporter | ||
Comment 2•17 years ago
|
||
(In reply to comment #1)
> Can we add the version of the add-on instead of "latest"?
Well, not if we want people to use this as a permalink to the respective latest version. They may copy it to their website and always link to the latest xpi.
> We could also use the add-on type instead of "addon" if we wanted, e.g.
> langpack-1234-latest.xpi or theme-1234-3.1.xpi
I like the idea.
Comment 3•17 years ago
|
||
(In reply to comment #2)
> (In reply to comment #1)
> > Can we add the version of the add-on instead of "latest"?
>
> Well, not if we want people to use this as a permalink to the respective latest
> version. They may copy it to their website and always link to the latest xpi.
I mean, the link says latest but the file name has the version in it.
Comment 4•17 years ago
|
||
i second comment 3. the link itself should contain generic "latest" but should also pass the real file name to built-in/external download manager, save as etc.
| Reporter | ||
Comment 5•17 years ago
|
||
Hm, I think I understand what you want, but let's say the link says ... myaddon-1.0.xpi. Somebody uses this link elsewhere.
Now the author updates the add-on to 1.1.
The link used elsewhere will still be called "...1.0.xpi", in spite of now pointing to the current version 1.1.
Remember that the whole introduction of a "latest" permalink was done in order to facilitate linking to the latest public version from *outside of AMO*. Including a version number in the link that won't stay up-to-date sounds strange to me.
Comment 6•17 years ago
|
||
I'm talking about the URL being
/addon/1234/latest/ (or whatever)
and sending something like:
header('Content-Disposition: attachment; filename="theme-1234-v3.1.xpi"');
when someone downloads it. I don't know if that's possible with our setup and all the redirection and stuff though.
| Reporter | ||
Comment 7•17 years ago
|
||
Oh, I was misinterpreting that. We are actually already sending these headers for non-browser applications. I wonder if we should send them for all "latest" downloads. Will the installer still come up then?
Comment 8•17 years ago
|
||
well, if you deploy the needed change to preview.addons.mozilla.org i volunteer to test it =)
| Assignee | ||
Comment 9•17 years ago
|
||
bug 481643 shows that we need the file extension on the end to help the download manager. Proposals so far are:
addon-1234-latest.xpi
langpack-1234-latest.xpi
I prefer the first since it requires less thinking for me to write.
Slightly better: I'm downloading from addons.mozilla.org, the site says Add-ons in big letters all over the place, so why do I now have a langpack?
Bikeshed away!
Assignee: nobody → jbalogh
Target Milestone: --- → 5.0.4
Comment 10•17 years ago
|
||
I prefer the first as well. An additional option is to use the same regex replacement we use when naming files.
So Password Exporter would become password_exporter-latest.xpi
Comment 11•17 years ago
|
||
First works for me. Using the regex replacement leads to stuff like bug 471891 which I'd like to avoid.
| Assignee | ||
Comment 12•17 years ago
|
||
going with the addon-$id-latest.xpi format
Attachment #370468 -
Flags: review?(clouserw)
Comment 14•17 years ago
|
||
Comment on attachment 370468 [details] [diff] [review]
adding generic filename to permalink URL
wfm. It would be good to replace your strrpos() stuff with pathinfo().
Attachment #370468 -
Flags: review?(clouserw) → review+
| Assignee | ||
Comment 15•17 years ago
|
||
r24048, with pathinfo.
Verified FIXED on:
https://preview.addons.mozilla.org/en-US/firefox/
https://preview.addons.mozilla.org/en-US/firefox/addon/3683
https://preview.addons.mozilla.org/en-US/firefox/search?q=imagetweak&cat=all
(https://preview.addons.mozilla.org/en-US/firefox/downloads/latest/3683/addon-3683-latest.xpi)
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Keywords: push-needed
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
•