Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylanvann/cloudinary-promised
Wrapper for Cloudinary functions.
https://github.com/dylanvann/cloudinary-promised
Last synced: 27 days ago
JSON representation
Wrapper for Cloudinary functions.
- Host: GitHub
- URL: https://github.com/dylanvann/cloudinary-promised
- Owner: DylanVann
- License: mit
- Created: 2018-07-18T18:55:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T20:14:08.000Z (about 6 years ago)
- Last Synced: 2024-08-08T21:50:43.761Z (3 months ago)
- Language: TypeScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudinary-promised
This repo contains a promisified version of some functions of the Cloudinary API.
It also does some detection of whether local paths are images or videos to make
the API more intuitive.```ts
interface CloudinaryConfig {
cloud_name: string;
api_key: string;
api_secret: string;
}
export declare const isVideo: (localAbsolutePath: string) => boolean;
export declare const uploadFile: (id: string, localAbsolutePath: string) => Promise;
export declare const getMetadata: (id: string, localAbsolutePath: string) => Promise;
export declare const imageExists: (id: string, config: CloudinaryConfig) => Promise;
export declare const videoExists: (id: string, config: CloudinaryConfig) => Promise;
export declare const fileExists: (id: string, localAbsolutePath: string, config: CloudinaryConfig) => Promise;
export declare const uploadOrGetMetadata: (id: string, localAbsolutePath: string, config: CloudinaryConfig) => Promise;
```