Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting remote file as local file #29

Open
RBIII opened this issue Apr 28, 2016 · 2 comments
Open

Detecting remote file as local file #29

RBIII opened this issue Apr 28, 2016 · 2 comments

Comments

@RBIII
Copy link

RBIII commented Apr 28, 2016

Was detecting the url http://pagead2.googlesyndication.com/simgad/9187813815045956841 as a local file and giving this error
Errno::ENOENT: No such file or directory @ rb_sysopen - /var/folders/ss/tbk3ffkj0snff_tgm5wp0wj00000gn/T/source20160428-33492-5fpoq7./simgad/9187813815045956841 from /Users/RoccoBasso/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tempfile.rb:136:ininitialize'` so I had to wrap in a begin/rescue block

@rhec
Copy link

rhec commented May 23, 2017

FYI - this isn't an issue in detecting whether the file is remote or not.
The problem is in trying to detect an extension to the file when the url doesn't have an extension. You can workaround it by passing in an image_type: Miro::DominantColors.new("http://pagead2.googlesyndication.com/simgad/9187813815045956841", "png").to_hex will return colors without error.

@ankitsinghaniyaz
Copy link

This still doesn't work after providing the type of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants