You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work on an application that as a part of it's operation uploads a file to a Docker container. The Docker API accepts only tar files. That's why the client API expects InputStream containing tar file to be passed. Of course I could create temporary tar file but the file I want to upload could be of arbitrary size so I would rather avoid that. The tar file format does not compress the content of the file and essentially is headers plus the content of the file plus padding. So what I've done is to wrap the original InputStream and create a new one that will return tar file. Here is my code:
Hi,
I work on an application that as a part of it's operation uploads a file to a Docker container. The Docker API accepts only tar files. That's why the client API expects InputStream containing tar file to be passed. Of course I could create temporary tar file but the file I want to upload could be of arbitrary size so I would rather avoid that. The tar file format does not compress the content of the file and essentially is headers plus the content of the file plus padding. So what I've done is to wrap the original InputStream and create a new one that will return tar file. Here is my code:
Do you think such feature could be a valuable addition to the library? If you think so I could make the code more generic and open a pull request.
The text was updated successfully, but these errors were encountered: