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

Support in-memory file via StringIO? #2

Open
fatuhoku opened this issue Jul 28, 2016 · 1 comment
Open

Support in-memory file via StringIO? #2

fatuhoku opened this issue Jul 28, 2016 · 1 comment

Comments

@fatuhoku
Copy link

The README says:

If you want to upload a file directly to Cloud Convert, pass the file object to the file argument. Make sure that the file object you are passing responds to the read method. Examples: File, Tempfile, ActionDispatch::Http::UploadedFile, etc.

Well ... I thought StringIO supports read so I would use that.

But then:

~/.rvm/gems/ruby-2.2.4/gems/httmultiparty-0.3.16/lib/httmultiparty.rb:16:in `file_to_upload_io': undefined method `path' for #<StringIO:0x007fe726b27900> (NoMethodError)

Why path?

@fatuhoku fatuhoku changed the title How to upload In-memory file? Support in-memory file via StringIO? Jul 28, 2016
@fatuhoku
Copy link
Author

raw input just didn't work for me.
Only file worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant