New packages: paste link instead of uploading a DMG #168
Comments
Thanks for the suggestion Michael. Sounds like a good idea -- avoids the obligatory download then upload when creating a package. |
I've been testing this for a few months now and it works quite nicely. Could you please merge the pull request? |
Thanks for the commits Michael. |
Thanks for cleaning up my code. As far as I can tell, your changes break in one situation that my original code didn't:
|
Ooooooh that's what that was doing! :) Thanks for the review. I'll make the change shortly. Jordan On Wednesday, 8 May, 2013 at 6:48 AM, Michael Kuron wrote:
|
Checkout aeb10f0 for the addition. I went with a ||= assignment instead of an if statement and opted for respond_to? instead of defined. Do you know of a redirecting download URL to test this use case with? |
Here's one: http://download.mozilla.org/?product=firefox-20.0&os=osx&lang=en-US and it works just fine. On a side note (not trivially fixable, but no big deal): the official link from Mozilla is https, but open-uri doesn't follow redirects from https to http. If you try to enter the https link, the resulting error message is
|
Mmm, good find. Since the server catches the error and gives a reasonable message to the user, I'm fine with the current implementation. Do you agree? |
Sure. The message even contains the redirect URL, so it's just a matter of copy/paste-ing. |
When adding a new package, it should be possible to optionally paste a link to a DMG instead of uploading the DMG. MunkiServer should then download the DMG from that link and treat it as if it were uploaded directly.
The text was updated successfully, but these errors were encountered: