The image uploader code is in the file named ffee and at the top of the ffee file you'll find instructions on how to set the sandbox demo up to use Cloudinary.īefore we can get to the good stuff (it's a relative term), we first need to define some settings for the Cloudinary API and a function to act as our image uploader. There's quite a bit of code ahead so if you prefer to learn using rather than reading you'll find all the code in the sandbox folder of the repo. If you're not familar with the basics of setting up an image uploader then I recommend you read the first couple of sections of the Handling image uploads tutorial (stop when you get to the code examples).Ĭloudinary provides API libraries for a number of popular languages including a JQuery plugin for JavaScript, but in the spirit of ContentTools we'll avoid using any specific framework and write our own set of functions to handle calling Cloudinary's (REST) API from the browser. In this section we're going to put together an image uploader for the Cloudinary API. unsigned upload approaches and the restrictions applied to unsigned uploads.īuilding an image uploader for Cloudinary This post from Cloudinary offers some details on the signed vs. That's it as far as configuring Cloudinary goes, next we need to configure our editor to talk to Cloudinary's API. Page Description Uploading assets: Details the options for uploading images, videos and other files to Cloudinary. By default the Mode will be set as Signed, change this to Unsigned and then save your changes. The Preset name will by default be assigned a unique code, you can leave this as is or rename it to something more memorable, either way make a note of it as we'll need it later. There are a lot of options on the next screen but we're only interested in the first 2 the Preset name and Mode. If so click the Edit option next to it, if not select the Add upload preset link. Your account may already have an upload preset defined. Scroll to the bottom of the page and locate the section labelled Upload presets. If unsigned uploading is not enabled click the Enable unsigned uploading link to enable it. Select the Settings link within the console navigation then select the Upload tab. We also need to configure our account to accept unsigned uploads, this is what allows us to off-load all of the server-side image handling to Cloudinary. On the console's dashboard in the Account Details section you'll see your Cloud name - make a note of it as we'll need it later. Once you have an account log into the site to access the console. If you don't have a Cloudinary account already then register one (it's free for the base tier and only takes a few seconds). To be clear I've picked Cloudinary here because it was recommended to me by a friend, there are other image management services out there Uploadcare was another I stumbled upon that looked promising. If you've arrived here from the Handling image uploads tutorial then congratulations on making it this far and now don't be mad but there was an easier alternative all along - Cloudinary.Ĭloudinary is a software–as-a-service (SaaS) solution for image management hosted in the cloud.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |