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
Hi,
I'm using this library to stream large files into my GCS buckets, and it works great and is performant—thank you for that.
I was wondering if there is a possibility to be able to parse the Content-Disposition header in each part of the boundary to distinct chunks (or Targets) for each and each file that was sent. (via the filename in the header).
Browsers, and generally HTTP clients, support sending multiple files with the same form field name, and the only thing that can distinguish parts is the Content-Disposition header with filename; I believe this is logic that should be written in the cython module (?)
Update:
After some review for the _parser written in Cython, I was thinking to this approach:
Creating a CustomTarget that will handle separating files the moment there is a new multipart_filename,
What are you suggest?
def on_data_received(self, chunk):
print("chunk is related to this filename: ", self.multipart_filename)
But i'm afraid of bytes (or chunks) that there are bytes from the end of the previous file and starting a new file. (in the same chunk) I'm not sure how to handle this.
Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey, would you be able to post some example data received by the server for the case when there are multiple files attached for one input? I'd like to have this feature, and I think it should be possible. I'd like to see what the data looks like before suggesting an implementation.
Hi,
I'm using this library to stream large files into my GCS buckets, and it works great and is performant—thank you for that.
I was wondering if there is a possibility to be able to parse the
Content-Disposition
header in eachpart
of the boundary to distinct chunks (or Targets) for each and each file that was sent. (via thefilename
in the header).Browsers, and generally HTTP clients, support sending multiple files with the same
form
field name, and the only thing that can distinguishpart
s is theContent-Disposition
header withfilename
; I believe this is logic that should be written in the cython module (?)Update:
After some review for the _parser written in Cython, I was thinking to this approach:
Creating a CustomTarget that will handle separating files the moment there is a new
multipart_filename
,What are you suggest?
But i'm afraid of bytes (or chunks) that there are bytes from the end of the previous file and starting a new file. (in the same chunk) I'm not sure how to handle this.
Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: