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
class OrderAssetsZipDownloadCreator | |
def self.build(order_id, force = false) | |
@order = Order.find(order_id) | |
@force = force | |
unless @order.download_zip_url.present? #prevent duplicate images from being added to zip. | |
reupload_assets_with_tag | |
#create_zip | |
end |
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
# Cloudinary credentials: | |
Set Variable [ $cloud_name; Value:"mycloudname" ] | |
Set Variable [ $api_key; Value:1234567890 ] | |
Set Variable [ $api_secret; Value:"abcdabcdabcdabcd" ] | |
# Validate presence of a file in "File Container" | |
If [ IsEmpty ( GetField ( "File Container" ) ) ] | |
Show Custom Dialog [ Title: "Error"; Message: "No image to upload"; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, | |
Commit: “No” ] | |
Exit Script [ Result: "No image to upload" ] |
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
<html> | |
<body> | |
<h1>Upload to Cloudinary with FormData</h1> | |
<form action="" method="post" enctype="multipart/form-data" onsubmit="AJAXSubmit(this); return false;"> | |
<fieldset> | |
<legend>Upload example</legend> | |
<p> | |
<label >Select your photo: | |
<input type="file" name="file"></label> | |
</p> |