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

Allow to specify filename as optional parameter to TypedByteArray #787

Closed
jonnor opened this issue Mar 19, 2015 · 5 comments
Closed

Allow to specify filename as optional parameter to TypedByteArray #787

jonnor opened this issue Mar 19, 2015 · 5 comments

Comments

@jonnor
Copy link

jonnor commented Mar 19, 2015

I would expect to be able to use new TypedByteArray(type, bytes, "myfilename.foo") to upload a file multi-part using RetroFit from an in-memory file instead of a File object.

Right now one needs to subclass using work-around described here: #178 (comment)

@rgrinberg
Copy link

+1. I've been bitten by this as well

@pepijntb
Copy link

+1. Also bitten.

@achuinard
Copy link

Yea, I never understood why you couldn't use a TypedByteArray in a multipart file upload. Had the API allowed it, probably would have just figured it out. I'm now using the subclass hack.

@tai2
Copy link

tai2 commented Jul 4, 2015

👍
achuinard's workaround works fine with current release.
https://gist.github.com/tai2/9b0e1b4f7bc1dd3adce0

@JakeWharton
Copy link
Collaborator

TypedByteArray is gone from v2. There's a whole new model of building data with content type and length information from OkHttp. For filename, this is something new and it's being tracked by #1140.

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

6 participants