Cgi.UploadedFile

This represents a file the user uploaded via a POST request.

Members

Functions

fileSize
ulong fileSize()
writeToFile
void writeToFile(string filenameToSaveTo)

Static functions

fromData
UploadedFile fromData(immutable(void)[] data, string name)

If you want to create one of these structs for yourself from some data, use this function.

Variables

content
immutable(ubyte)[] content;

Undocumented in source.

contentFilename
string contentFilename;

Undocumented in source.

contentInMemory
bool contentInMemory;

For small files, cgi.d will buffer the uploaded file in memory, and make it directly accessible to you through the content member. I find this very convenient and somewhat efficient, since it can avoid hitting the disk entirely. (I often want to inspect and modify the file anyway!)

contentType
string contentType;

Undocumented in source.

filename
string filename;

Undocumented in source.

name
string name;

Undocumented in source.

Meta