cloudex v0.2.1 Cloudex.CloudinaryApi

The live API implementation for Cloudinary uploading

Link to this section Summary

Functions

Deletes an image given a public id

Converts the json result from cloudinary to a %UploadedImage{} struct

Upload either a file or url to cloudinary returns {:ok, %UploadedFile{}} containing all the information from cloudinary or {:error, “reason”}

Link to this section Functions

Link to this function delete(item)
delete(String.t) ::
  {:ok, %Cloudex.DeletedImage{public_id: term}} |
  {:error, any}

Deletes an image given a public id

Link to this function json_result_to_struct(result, source)
json_result_to_struct(map, String.t) :: %Cloudex.UploadedImage{bytes: term, created_at: term, etag: term, format: term, height: term, original_filename: term, public_id: term, resource_type: term, secure_url: term, signature: term, source: term, tags: term, type: term, url: term, version: term, width: term}

Converts the json result from cloudinary to a %UploadedImage{} struct

Link to this function upload(item, opts \\ %{})
upload(String.t | {:ok, String.t}, map) ::
  {:ok, %Cloudex.UploadedImage{bytes: term, created_at: term, etag: term, format: term, height: term, original_filename: term, public_id: term, resource_type: term, secure_url: term, signature: term, source: term, tags: term, type: term, url: term, version: term, width: term}} |
  {:error, any}

Upload either a file or url to cloudinary returns {:ok, %UploadedFile{}} containing all the information from cloudinary or {:error, “reason”}