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

allow upload of local images #4

Open
tcurdt opened this issue Nov 15, 2015 · 4 comments
Open

allow upload of local images #4

tcurdt opened this issue Nov 15, 2015 · 4 comments

Comments

@tcurdt
Copy link

tcurdt commented Nov 15, 2015

AFAIK now open-uri uses simple paths /some/path/image.jpg for local files.

And that's why this check prohibits the upload of local images https://github.com/werein/prestashop/blob/master/lib/prestashop/mapper/models/image.rb#L32

@jirikolarik
Copy link
Member

Yes, we are uploading only remote files, but that shouldn't be problem to add this functionality

@tcurdt
Copy link
Author

tcurdt commented Nov 17, 2015

Should we just get rid of the URI check and pass it directly?

@jirikolarik
Copy link
Member

I'd suggest to make the check more sophisticated otherwise it may fail, when the path doesn't exists.

@tcurdt
Copy link
Author

tcurdt commented Nov 17, 2015

You want to check if it's a path or a URL - and if it's a path check for existence?

I would have delegated this further down the to the underlying (MiniMagick) implementation. That should give an error we can just catch.

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

No branches or pull requests

2 participants