vibe.d: How to get the conent of a file upload ?

Steven Schveighoffer schveiguy at
Sat Sep 19 19:27:40 UTC 2020

On 9/19/20 6:59 AM, wjoe wrote:
> Handling file uploads is one example, another is command line arguments.
> The presumption here is there is vibe and there can only be vibe. It 
> takes them from Runtime.args. Duh?
> This didn't make sense to me until I saw example where the 
> initialization of vibe was done in a module constructor.

This used to be the expected way to set up vibe (using module 
constructors). And vibe would provide its own main function.

I *think* the idea was to allow registration of different handlers in 
their respective modules.

Nowadays, you just run the setup wherever you want (I do everything in 

> By using vibe I feel like I need to bend myself like a snake and jump 
> through the hoops of vibe's one way to do it. You save a lot of time 
> here and there and then you lose half a day because of some stupid road 
> block like the above.

I used Kai's book, and yeah, you have to do things the vibe way. But 
most web frameworks are that way I think.

I recommend getting the book if you plan on doing a lot with vibe.d

Where vibe really shines are the diet templates and the web interface 
stuff. To not have to handle anything from forms, or query parameters, 
and just write normal D functions is really great. You can even do a lot 
of authentication and stuff using UDAs. It helps you write consistent 
web applications.

And I LOVE diet templates. So much less verbose than actual HTML. I have 
a hard time writing actual HTML now.

When you want to do stuff manually, I think it's not as well supported.


More information about the Digitalmars-d-learn mailing list