I would personally just put it in an Amazon S3 bucket for a bit more control (including, probably, setting Content-Type and/or Content-Disposition to prevent Firefox from trying to install it, until we do https://github.com/zotero/zotero/issues/1379) . I suspect the data transfer costs would be minimal, but you could do some quick calculations.
You can set content-type for GH release assets. I have my xpis as assets
On Friday, November 1, 2019 at 9:47:36 AM UTC-4, Emiliano Heyns wrote:You can set content-type for GH release assets. I have my xpis as assetsHmm, I don't see a practical difference between the xpi files attached your BBT GitHub releases and those attached to my Zutilo releases. In both cases, when I click on the link in Firefox, it tries to install the xpi as a Firefox add-on. If I try to do "Save link as...", I get a message that an unknown error has occurred. After I download the xpi's outside of Firefox, `file --mime-type` gives me application/zip for both. For Zutilo, I set the Content-Type header to application/xpi-install when I upload using the GitHub API.
> Hosting on GitHub is not optimal and I don't think you are supposed to do thatI don't think it is true that you are not supposed to host releases on GitHub. Releases are a standard feature of GitHub (e.g. https://help.github.com/en/github/administering-a-repository/creating-releases). I do agree that hosting on a site you fully control would give more control, and possibly be more reliable (trusting GitHub not to change their features vs. trusting yourself not to forget to renew a domain or something like that).
On 11/4/19 10:34 AM, Will S wrote:
> For Zutilo, I set the Content-Type header to application/xpi-install
> when I upload using the GitHub API.
You don't want to do that, since these are no longer Firefox extensions
and you don't want Firefox to try to install them. (It's possible
Firefox would still try to install an extension with a different
Content-Type if it had an .xpi extension, but hopefully not.)
We should probably just pick a MIME type for Zotero plugins, and a
future version of the Zotero Connector could prompt to install those
into the client. application/vnd.zotero.plugin?
On Monday, November 4, 2019 at 4:34:14 PM UTC+1, Will S wrote:
On Friday, November 1, 2019 at 9:47:36 AM UTC-4, Emiliano Heyns wrote:You can set content-type for GH release assets. I have my xpis as assetsHmm, I don't see a practical difference between the xpi files attached your BBT GitHub releases and those attached to my Zutilo releases. In both cases, when I click on the link in Firefox, it tries to install the xpi as a Firefox add-on. If I try to do "Save link as...", I get a message that an unknown error has occurred. After I download the xpi's outside of Firefox, `file --mime-type` gives me application/zip for both. For Zutilo, I set the Content-Type header to application/xpi-install when I upload using the GitHub API.Save link as works for me without issue. It's how I've always done it.
On Monday, November 4, 2019 at 7:11:05 PM UTC+1, Emiliano Heyns wrote:
On Monday, November 4, 2019 at 4:34:14 PM UTC+1, Will S wrote:
On Friday, November 1, 2019 at 9:47:36 AM UTC-4, Emiliano Heyns wrote:You can set content-type for GH release assets. I have my xpis as assetsHmm, I don't see a practical difference between the xpi files attached your BBT GitHub releases and those attached to my Zutilo releases. In both cases, when I click on the link in Firefox, it tries to install the xpi as a Firefox add-on. If I try to do "Save link as...", I get a message that an unknown error has occurred. After I download the xpi's outside of Firefox, `file --mime-type` gives me application/zip for both.
> Right-click, save-as also works for me on the Zutilo release. No error, and `file zutilo.xpi` says `Zip archive data, at least v2.0 to extract`, as I'd expectThe behavior I see must be system specific then. I see an "unknown error" on Linux, and another user who was also using Linux contacted me about the error as well.
The fact that Emiliano and I see the same behavior for Zutilo and BBT makes me think that GitHub does not do anything with this Content-Type header. For now I could change it application/zip (nothing else in the list linked to from the GitHub documentation seems appropriate https://developer.github.com/v3/repos/releases/#upload-a-release-asset).
If there are no objections, let's go with application/vnd.zotero.plugin,
and we'll look into adding installation from the Zotero Connector. I've
also confirmed that Firefox does not offer to install an XPI with
another type, so this will immediately put an end to the confusing
"appears to be corrupt" message for Firefox users.
I'm not sure what you mean by "GitHub does not do anything with this
Content-Type header". Both Zutilo and BBT are currently uploaded as
application/x-xpinstall, which is why Firefox offers to install them
both. GitHub serves the file with the type that you specify — that's the
thing it does with the header.
Okay, thanks for the clarification. Forgive my ignorance, how exactly do you specify the content_type header when serving releases through github?
Hi!I ran into a problem with my last update. Can someone help me out with this? Zotero throws this error when I try to update zotfile:Here is the GitHub repro: https://github.com/jlegewie/zotfile[JavaScript Error: "XML Parsing Error: prefix not bound to a namespaceLocation: moz-nullprincipal:{e9287aed-7214-9f4c-bcde-f6ecfa7fa532}Line Number 4, Column 5:" {file: "moz-nullprincipal:{e9287aed-7214-9f4c-bcde-f6ecfa7fa532}" line: 4 column: 5 source: " <RDF:Description about="urn:mozilla:extension:zot...@columbia.edu">"}]
Also what are the changes I should make to follow the convention about content type and file extension?
--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/ryzC01j8IhY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/fe9b47d0-74c8-4aa7-83cc-f84e0db48f0a%40googlegroups.com.
Bad guess then 😉. What's the full link to the rdf file?
To unsubscribe from this group and all its topics, send an email to zoter...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/51b6bf10-b0e6-4db9-a71a-05a8df13214a%40googlegroups.com.
If you mean Zutilo 3.3.3, that's still being served with Content-Type:
application/x-xpinstall. (You can see in the Network pane in browser
devtools.)
Aren't namespace prefixes case sensitive? You have both rdf and RDF.