diff --git a/cloudinary_cli/core/overrides.py b/cloudinary_cli/core/overrides.py index 4d782d5..650f9c5 100644 --- a/cloudinary_cli/core/overrides.py +++ b/cloudinary_cli/core/overrides.py @@ -35,6 +35,24 @@ def resolve_command(self, ctx, args): # Patch to set `auto` resource type def upload(file, **options): + """ + Uploads an asset to a Cloudinary cloud. + + The asset can be: + * a local file path + * the actual data (byte array buffer) + * the Data URI (Base64 encoded), max ~60 MB (62,910,000 chars) + * the remote FTP, HTTP or HTTPS URL address of an existing file + * a private storage bucket (S3 or Google Storage) URL of a whitelisted bucket + + See: https://cloudinary.com/documentation/image_upload_api_reference#upload_method + :param file: The asset to upload. + :type file: Any or str + :param options: The optional parameters. See the upload API documentation. + :type options: dict, optional + :return: The result of the upload API call. + :rtype: dict + """ if "resource_type" not in options.keys(): options["resource_type"] = "auto" return original_upload(file, **options) diff --git a/cloudinary_cli/utils/utils.py b/cloudinary_cli/utils/utils.py index 36f1d3f..bb71b58 100644 --- a/cloudinary_cli/utils/utils.py +++ b/cloudinary_cli/utils/utils.py @@ -19,7 +19,7 @@ not_callable = ('is_appengine_sandbox', 'call_tags_api', 'call_context_api', 'call_cacheable_api', 'call_api', 'call_metadata_api', 'call_json_api', 'only', 'transformation_string', 'account_config', - 'reset_config', 'upload_large_part', 'upload_image', 'upload_resource') + 'reset_config', 'upload_large_part', 'upload_image', 'upload_resource', 'build_eager') BLOCK_SIZE = 65536