new CloudinaryHelper(configopt)
Create an CloudinaryHelper.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
The configuration settings for the cloudinary API.
Properties
|
Members
(static) defaultConfig
Returns the Default cloudinary config for image storing.
(static) storage
Returns the disk storage used for cloudinary uploads.
(static) upload
Returns the multer object used for Cloudinary uploads.
Methods
(static) imageFilter(req, file, cb)
Restrict file extensions of images to be uploaded to Cloudinary.
Parameters:
Name | Type | Description |
---|---|---|
req |
Request | The HTTP request object. |
file |
Object | The image file to be uploaded. |
cb |
requestCallback | The callback that handles the response. |
(async) uploadImageToCloudinary()
Upload image to Cloudinary API.