Hello,

In an Awful web app, I'm trying to read an image posted as raw data to the server, since it seems multipart/form-data isn't supported. (Is that right?) But I get the feeling I'm missing something regarding ports and requests...

I *think* my basic question is, how do I know the request is finished? But more than that, is there a better way to be going this?

I've got something like:

(with-output-to-file "media/image.jpg" (lambda () (port-map write-byte (lambda () (read-byte (request-port (current-request)))))))

; never gets here
"Success"

With JSON objects this wasn't a problem, using Medea:
(read-json (request-port (current-request)) consume-trailing-whitespace: #f)


Thanks a lot for any help,

Nathaniel
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to