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
No matter what I do, I can not get the complete uploaded file from the stream obtained from (body-parameter). The stream always ends at the same position partway into the file content.
I think the problem is in this code in http-body.multipart
(loop with buffer = (make-array1024:element-type'(unsigned-byte8))
for read-bytes = (read-sequence buffer stream)
do (funcall parser (subseq buffer 0 read-bytes))
while (= read-bytes 1024))))))
I can get the complete file using (getf (clack.request:env *request*) :raw-body-buffer) but it is not a viable solution for big files because it loads the complete file into RAM.
For the same request (hunchentoot:post-parameter :content-file) returns a pathname to the saved file. This is what I need, but that call breaks Clack.
The text was updated successfully, but these errors were encountered:
I made a mistake above. The call (hunchentoot:post-parameter :content-file) can not be used inside a Clack handler because clack.handler.hunchentoot::handle-request reads the stream before (post-parameter) can get to it.
I am trying to upload files as part of multipart/form-data with chunked encoding. The drakma request is:
No matter what I do, I can not get the complete uploaded file from the stream obtained from (body-parameter). The stream always ends at the same position partway into the file content.
I think the problem is in this code in http-body.multipart
I can get the complete file using
(getf (clack.request:env *request*) :raw-body-buffer)
but it is not a viable solution for big files because it loads the complete file into RAM.For the same request
(hunchentoot:post-parameter :content-file)
returns a pathname to the saved file. This is what I need, but that call breaks Clack.The text was updated successfully, but these errors were encountered: