miro icon indicating copy to clipboard operation
miro copied to clipboard

Detecting remote file as local file

Open RBIII opened this issue 9 years ago • 2 comments

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

RBIII avatar Apr 28 '16 22:04 RBIII

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.

rhec avatar May 23 '17 16:05 rhec

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

ankitsinghaniyaz avatar May 11 '22 05:05 ankitsinghaniyaz