Open msgilligan opened 11 years ago
Cool - will do this week - in the meantime something like a tempFile should get you where you want to go
I've been using a tempFile, but that is problematic for several reasons. When do you think you'll have something ready to test?
Hey @msgilligan - I'm taking a look at this today It's a bit tricky due to how the data is passed around but I should have something for you by EOD
Where I'm headed with this: https://github.com/tumblr/jumblr/tree/byte_data
Thanks! That looks like it will work for me. I'd like to see a stream-based solution, too -- but I'm not yet in a position to try that out. I'm using Jumblr on the server and proxying file uploads, so I think it might be cool to be able to wire InputStream to OutputStream, but I also realize that approach is somewhere between tricky and impossible.
Also, are you sure you want to eliminate the File-based solution (which might be good for Android apps )
When will you be ready for me to try this out?
Heya - the File
based solution is still there - it overloads setData
and reads the file on set
. Should be ready soon - just need to clean up some tests
That makes sense. I don't know if or how much you care about not loading the whole file into memory...
I can make the base of FileData take an input stream and mime type instead. Will get that together
On Tuesday, July 16, 2013, Sean Gilligan wrote:
That makes sense. I don't know if or how much you care about not loading the whole file into memory...
— Reply to this email directly or view it on GitHubhttps://github.com/tumblr/jumblr/issues/19#issuecomment-21063967 .
Yeah, that sounds like the most flexible approach...
This was long time ago but how I go with the tempFile method since there are still no other way to do this?
File works fine inside IDE but when I'm trying it outside with a .JAR that I built I get 401 error.
This branch was close: https://github.com/tumblr/jumblr/blob/byte_data/src/main/java/com/tumblr/jumblr/types/PhotoPost.java
Otherwise tempFile as long as you're able to write to a tmp directory from your JAR. What is the path of the tempFile you're constructing?
The API is currently limited to only reading the Photo image from a file. It would be nice to have other options available.