Project

General

Profile

stealSpooledFile()

Added by Sebastian Fett almost 3 years ago

Hey there,

How do I specify where my uploaded file lands in a WFileUpload, documentation has no hints and I might not have access to /tmp on every device where I wanna run my Webpage. Furthermore, is filehandling documented somewhere or am I supposed to call system/bash to move and rename the uploaded file after stealing it? Neiter the API nor your examples contain any information (at least not linked anywhere close to WFileUpload) on how to manage the uploaded files.

Thanks


Replies (1)

RE: stealSpooledFile() - Added by Roel Standaert almost 3 years ago

Yeah, we consider what you do with the file after it is uploaded outside of the scope of Wt. We usually use boost::filesystem (or std::filesystem) for that.

As for configuring the location for temporary files, it appears that this is actually done with an undocumented environment variable called WT_TMP_DIR. Maybe that's something we'll want to document better, or allow some other way to configure that.

    (1-1/1)