-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This enhancement give the images API the ability to create images from URLs. A simple check determines whether or not the attachment parameter is a URL. If it is a URL: OpenURI is used to download the image and it subsequently undergoes the standard post upload processing (via paperclip). After processing the image, the other attributes (besides :attachment) are updated on the resultant Spree::Image. If it is not a URL: the attachment parameter is handled in the same manner it was prior to this commit. API documentation added. • Avoid unnecessary host check in valid_url? • Use static image from solidus repo, to avoid external dependency
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters