-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
(FastAPI) forward multi-file streaming to httpx POST request, without writing to disk? #114
Comments
so it looks like I'll have to make a custom Target class of sorts - and implement |
What's your setup? Are you directly uploading to the server, or are you uploading to a server that in turn uploads to a server? You need streaming-form-data only in the second case. If you're directly uploading to a server (the first scenario I mentioned), I think just an
|
@siddhantgoel mine is the second case, where I'm uploading to a server that "forwards" the uploading to another server. My FastAPI app uses is it possible to use |
OK, yes in that case a custom target might work, at least from the client side. I haven't looked at the StackOverflow answer in too much detail. But from a first glance it seems to use |
yeah I was thinking of that - I'll try it in a couple days and let you know if it works! will post the solution here if it does |
Just like the title says! I’ve noticed that the use of
FileTarget
writes to disk. But, for my use case, I want to forward multiple files to ahttpx
POST request. I’ve already implemented this answer here, but it still writes to disk. Is there any way to do this without writing to the filesystem, and instead keeping streaming directly to another HTTP request? (thus keeping memory usage low)The text was updated successfully, but these errors were encountered: