vibe.d: How to get the conent of a file upload ?
d.forum at webfreak.org
Thu Sep 17 16:32:55 UTC 2020
On Thursday, 17 September 2020 at 16:00:33 UTC, wjoe wrote:
> I found this  but unfortunately the post this refers to is a
> dead link and the content, unfortunately, didn't tell me
> anything that I didn't already find in the docs.
> What I can get from the form is the form fields with content,
> the field name for the file upload and the file name. But the
> file name is useless to me because I need the file content.
> Where is it stored ?
>  https://aberba.com/2017/multiple-file-upload-in-vibe-d/
hi, you can access HTTPServerRequest.files which contains the
Example in real code:
Note: the file is only downloaded from the client / stored on
disk once you access the files or the form property, though this
I don't believe the temp file behavior is customizable as it is
hardcoded here to write to a temporary file (which is called on
However if you really wanted to (but I'd advise against it) you
could parse the form data from the HTTPServerRequest.bodyReader
More information about the Digitalmars-d-learn