39 ms·
this is what i did: I have a form that: user can upload as many as s/he wants user clicks submit the browser then sends a stream of data one time on the serve
by hs 18y ago
this is what i did:
I have a form that:
user can upload as many as s/he wants
user clicks submit
the browser then sends a stream of data one time
on the server:
regex find .multipart/form-data;.boundary=.* from CONTENT_TYPE to make sure it's the right stream
save the stream into temp-file, read the temp-file
split file-stream based on .filename=\"(.)\".* into chunks
afterward, "calibrate" the chunk (determine start & end write positions)
then loop and write the chunks into specific filenames provided in the stream
so there are 1 upload stream and 1 load n+1 write operations
I wonder if it helps since I don't use php (hint: newlisp)
- amrithk 18y agoThanks for the suggestion. So I would basically write the pointer information (that would have been written to the database) to a temporary file instead? Do you think this improves performance significantly?