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

Unable to upload large files #36

Open
kipz opened this issue Feb 6, 2013 · 5 comments
Open

Unable to upload large files #36

kipz opened this issue Feb 6, 2013 · 5 comments
Labels

Comments

@kipz
Copy link

kipz commented Feb 6, 2013

When uploading large files, a stream is passed to the API:

Flickr.getUploader().upload(InputStream, params)

However, REST.java buffers everything in to a ByteArrayOutputStream before passing it to the scribe OAuth library. Therefore, uploading large files can often cause out of memory errors (depends on the size of file and heap of course).

Scribe OAuth (as far as I know) doesn't support any streaming yet, so we could either create our own implementation, swap out for an implementation that does support this, or ask and wait for those guys to fix theirs.

I've opened an issue on Scribe related to this:

scribejava/scribejava#347

@kipz
Copy link
Author

kipz commented Feb 7, 2013

I forgot to mention, that this currently prevents me from uploading videos (MOVs) over 100MB with a default heap with Oracle JRE 7 on Mac.

@boncey
Copy link
Owner

boncey commented Feb 8, 2013

I don't use Flickr4Java for video (yet) so I've not seen this.

I guess we can see what the Scribe folks say as that would be the best solution I think.
If they request a patch is that something you'd consider doing?

@kipz
Copy link
Author

kipz commented Feb 8, 2013

I'll have a go, but to be honest, doing all that on top of HTTPConnection will be a bit of a bore. Ideally they would integrate Apache HTTP client (or similar) which would give much of it for free.

@boncey
Copy link
Owner

boncey commented Feb 8, 2013

Good point.
This pull request looks interesting, wonder if it will get accepted.
scribejava/scribejava#250

@kipz
Copy link
Author

kipz commented Feb 8, 2013

Let's hope so, but it's looking pretty quiet over there at the moment...

@boncey boncey added the bug label Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants