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)

defect
Not set
trivial

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: wenzel, Assigned: jbalogh)

References

Details

Attachments

(1 file)

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?
No longer depends on: 473681
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
(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.
(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.
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.
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.
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.
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?
well, if you deploy the needed change to preview.addons.mozilla.org i volunteer to test it =)
Blocks: 481643
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
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
First works for me. Using the regex replacement leads to stuff like bug 471891 which I'd like to avoid.
going with the addon-$id-latest.xpi format
Attachment #370468 - Flags: review?(clouserw)
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+
r24048, with pathinfo.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: push-needed
Resolution: --- → FIXED
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: