Skip to content

Commit

Permalink
get rid of Cakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung Lê committed Dec 16, 2015
1 parent 7622b65 commit ed745e0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 39 deletions.
10 changes: 0 additions & 10 deletions Cakefile

This file was deleted.

63 changes: 34 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Cloudinary
==========

Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.

Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.
Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.

Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.

Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.
Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.

For Node.js, Cloudinary provides an extension for simplifying the integration even further.

Expand All @@ -23,7 +23,7 @@ npm install cloudinary

Sign up for a [free account](https://cloudinary.com/users/register/free) so you can try out image transformations and seamless image delivery through CDN.

*Note: Replace `demo` in all the following examples with your Cloudinary's `cloud name`.*
*Note: Replace `demo` in all the following examples with your Cloudinary's `cloud name`.*

Accessing an uploaded image with the `sample` public ID through a CDN:

Expand All @@ -37,7 +37,7 @@ Generating a 150x100 version of the `sample` image and downloading it through a

![Sample 150x100](https://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill/sample.jpg "Sample 150x100")

Converting to a 150x100 PNG with rounded corners of 20 pixels:
Converting to a 150x100 PNG with rounded corners of 20 pixels:

http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill,r_20/sample.png

Expand All @@ -46,19 +46,19 @@ Converting to a 150x100 PNG with rounded corners of 20 pixels:
For plenty more transformation options, see our [image transformations documentation](http://cloudinary.com/documentation/image_transformations).

Generating a 120x90 thumbnail based on automatic face detection of the Facebook profile picture of Bill Clinton:

http://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg

![Facebook 90x120](https://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg "Facebook 90x200")

For more details, see our documentation for embedding [Facebook](http://cloudinary.com/documentation/facebook_profile_pictures) and [Twitter](http://cloudinary.com/documentation/twitter_profile_pictures) profile pictures.
For more details, see our documentation for embedding [Facebook](http://cloudinary.com/documentation/facebook_profile_pictures) and [Twitter](http://cloudinary.com/documentation/twitter_profile_pictures) profile pictures.


## Usage

### Configuration

Each request for building a URL of a remote cloud resource must have the `cloud_name` parameter set.
Each request for building a URL of a remote cloud resource must have the `cloud_name` parameter set.
Each request to our secure APIs (e.g., image uploads, eager sprite generation) must have the `api_key` and `api_secret` parameters set. See [API, URLs and access identifiers](http://cloudinary.com/documentation/api_and_access_identifiers) for more details.

Setting the `cloud_name`, `api_key` and `api_secret` parameters can be done either directly in each call to a Cloudinary method, by calling the cloudinary.config(), or by using the CLOUDINARY_URL environment variable.
Expand All @@ -83,32 +83,32 @@ The following example generates the url for accessing an uploaded `sample` image

cloudinary.url("sample.jpg", {width: 100, height: 150, crop: "fill"})

Another example, emedding a smaller version of an uploaded image while generating a 90x90 face detection based thumbnail:
Another example, emedding a smaller version of an uploaded image while generating a 90x90 face detection based thumbnail:

cloudinary.url("woman.jpg", {width: 90, height: 90, crop: "thumb", gravity: "face"})

You can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.
You can provide either a Facebook name or a numeric ID of a Facebook profile or a fan page.

Embedding a Facebook profile to match your graphic design is very simple:

cloudinary.url("billclinton.jpg", {width: 90, height: 130, type: "facebook", crop: "fill", gravity: "north_west"})

Same goes for Twitter:

cloudinary.url("billclinton.jpg", {type: "twitter_name"})

![](http://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **See [our documentation](http://cloudinary.com/documentation/node_image_manipulation) for more information about displaying and transforming images in Node.js**.
![](http://res.cloudinary.com/cloudinary/image/upload/see_more_bullet.png) **See [our documentation](http://cloudinary.com/documentation/node_image_manipulation) for more information about displaying and transforming images in Node.js**.

### Upload

Assuming you have your Cloudinary configuration parameters defined (`cloud_name`, `api_key`, `api_secret`), uploading to Cloudinary is very simple.
The following example uploads a local JPG to the cloud:

The following example uploads a local JPG to the cloud:

var cloudinary = require('cloudinary')

cloudinary.uploader.upload("my_picture.jpg", function(result) { console.log(result) })

Below is an example of an upload's result:

{ public_id: '4srvcynxrf5j87niqcx6w',
Expand All @@ -119,16 +119,16 @@ Below is an example of an upload's result:
format: 'jpg',
resource_type: 'image',
url: 'http://res.cloudinary.com/demo/image/upload/v1340625837/4srvcynxrf5j87niqcx6w.jpg',
secure_url: 'https://res.cloudinary.com/demo/image/upload/v1340625837/4srvcynxrf5j87niqcx6w.jpg' }
secure_url: 'https://res.cloudinary.com/demo/image/upload/v1340625837/4srvcynxrf5j87niqcx6w.jpg' }

The uploaded image is assigned a randomly generated public ID. The image is immediately available for download through a CDN:

cloudinary.url("abcfrmo8zul1mafopawefg.jpg")

http://res.cloudinary.com/demo/image/upload/abcfrmo8zul1mafopawefg.jpg

You can also specify your own public ID:
You can also specify your own public ID:

cloudinary.uploader.upload("http://www.example.com/image.jpg", function(result) { console.log(result) }, {public_id: 'sample_remote'})

cloudinary.url("sample_remote.jpg")
Expand Down Expand Up @@ -167,23 +167,28 @@ Usage:

### Samples

You can find our simple and ready-to-use samples projects, along with documentation in the [samples folder](https://github.com/cloudinary/cloudinary_npm/tree/master/samples).
You can find our simple and ready-to-use samples projects, along with documentation in the [samples folder](https://github.com/cloudinary/cloudinary_npm/tree/master/samples).
Please consult with the [README file](https://github.com/cloudinary/cloudinary_npm/blob/master/samples/README.md), for usage and explanations.



## Additional resources ##########################################################

Additional resources are available at:

* [Website](http://cloudinary.com)
* [Documentation](http://cloudinary.com/documentation)
* [Knowledge Base](http://support.cloudinary.com/forums)
* [Knowledge Base](http://support.cloudinary.com/forums)
* [Documentation for Node.js integration](http://cloudinary.com/documentation/node_integration)
* [Node.js image upload documentation](http://cloudinary.com/documentation/node_image_upload)
* [Node.js image manipulation documentation](http://cloudinary.com/documentation/node_image_manipulation)
* [Image transformations documentation](http://cloudinary.com/documentation/image_transformations)

## Run test

```
npm run test
```

## Support

You can [open an issue through GitHub](https://github.com/cloudinary/cloudinary_npm/issues).
Expand All @@ -196,6 +201,6 @@ Stay tuned for updates, tips and tutorials: [Blog](http://cloudinary.com/blog),

Released under the MIT license.

Test resources include the video [Cloud Book Study](https://vimeo.com/27172301)
which was created by [Heidi Neilson](https://vimeo.com/heidineilson)
Test resources include the video [Cloud Book Study](https://vimeo.com/27172301)
which was created by [Heidi Neilson](https://vimeo.com/heidineilson)
and is distributed under the Creative commons - attribution license (CC BY 3.0)

0 comments on commit ed745e0

Please sign in to comment.