Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedirandy/meteor-cloudinary
cloudinary package for meteor
https://github.com/jedirandy/meteor-cloudinary
Last synced: about 1 month ago
JSON representation
cloudinary package for meteor
- Host: GitHub
- URL: https://github.com/jedirandy/meteor-cloudinary
- Owner: jedirandy
- Created: 2015-09-23T14:55:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-18T15:08:59.000Z (about 9 years ago)
- Last Synced: 2024-04-14T06:03:12.168Z (9 months ago)
- Language: JavaScript
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# meteor-cloudinary
Cloudinary NPM, jQuery package for meteorCurrent version:
Cloudinary NPM `1.2.5`
https://github.com/cloudinary/cloudinary_npmCloudinary jQuery plugin `1.0.25`
https://github.com/cloudinary/cloudinary_js## Usage
### Server-side:
- initialization
```
cloudinary.config({
cloud_name: 'your cloud name',
api_key: 'your api key',
api_secret: 'your api secret'
});
```- to get a signature for client-side direct upload
```
var signature = cloudinary.utils.api_sign_request(params, api_secret);
```- or use this method to get 'form-data' and form attributes to be used by the Cloudinary uploader input
```
var signedData = cloudinary.uploader.direct_upload(callback_url, params);
```### Client-side:
- insert an input tag
``````
- set the upload parameters and signature fetched from the server
```
$('#uploader').attr('data-form-data', form_data);
$('#uploader').attr('data-form-url', upload_url);
```- configurate the input
```
$('#uploader').cloudinary_fileupload({
disableImageResize: false,
imageMaxWidth: 1000,
imageMaxHeight: 1000,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|bmp|ico)$/i,
maxFileSize: 3000000,
// ...
});
```See http://cloudinary.com/documentation/jquery_integration#upload_images for more details