Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve doc strings #103

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cloudinary_cli/core/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cloudinary_cli/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading