Skip to content

Uploading large files from a stream #120

Description

@ghazi-git

Hello,

I've been using cloudinary for quite some time and it's been great. Thanks.

Now, I need to be able to upload large files (generated reports) that might go beyond 100 MB. According to docs, I need to use the upload_large. My issue is that I have a stringio object and I couldn't use the upload_large function to upload it to cloudinary (stringio object worked fine with cloudinary.uploader.upload). I'm getting this:
TypeError: coercing to Unicode: need string or buffer, instance found
Looking at the implementation of upload_large, I see that it's invoking open on the file argument which means it expects a filename/path of a file on the file system which is inconsistent compared to cloudinary.uploader.upload.

So, I want to ask:

  • Is there a way to use a stream (maybe sth other than stringio) with upload_large ?
  • Also, I want to check if there is a constraint that needs the "large" files to be on the file system.

Of course I have no file size issue as the paid cloudinary plan is customized to support uploading up to 200MB per file.

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions