Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



Thanks 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?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: