forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
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 and update 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. Uses static image from solidus repo, to avoid external dependency
- Loading branch information
Showing
3 changed files
with
54 additions
and
2 deletions.
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