We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
upload_resource
1 parent 7c8aeb2 commit 83ebad1Copy full SHA for 83ebad1
cloudinary/uploader.py
@@ -62,7 +62,12 @@ def upload_image(file, **options):
62
63
64
def upload_resource(file, **options):
65
- result = upload_large(file, **options)
+ upload_func = upload
66
+ if hasattr(file, 'size') and file.size > UPLOAD_LARGE_CHUNK_SIZE:
67
+ upload_func = upload_large
68
+
69
+ result = upload_func(file, **options)
70
71
return cloudinary.CloudinaryResource(
72
result["public_id"], version=str(result["version"]),
73
format=result.get("format"), type=result["type"],
0 commit comments