Wt  3.7.1
Public Member Functions | List of all members
Wt::Http::UploadedFile Class Reference

Details about a file uploaded with a request to a resource. More...

#include <Wt/Http/Request>

Public Member Functions

const std::string & spoolFileName () const
 Return the spool file name. More...
 
const std::string & clientFileName () const
 Returns the client file name. More...
 
const std::string & contentType () const
 Returns the file content type. More...
 
void stealSpoolFile () const
 Steals the uploaded spool file. More...
 

Detailed Description

Details about a file uploaded with a request to a resource.

See also
Request::uploadedFiles()
WResource::handleRequest()

Member Function Documentation

◆ clientFileName()

const std::string & Wt::Http::UploadedFile::clientFileName ( ) const

Returns the client file name.

This is the location that was indicated by the browser.

Note
Depending on the browser this is an absolute path or only the file name.

◆ contentType()

const std::string & Wt::Http::UploadedFile::contentType ( ) const

Returns the file content type.

Returns the content mime-type that was sent along with the uploaded file.

◆ spoolFileName()

const std::string & Wt::Http::UploadedFile::spoolFileName ( ) const

Return the spool file name.

This is the location on the local (server) filesystem where the uploaded file is temporarily stored. Unless you call stealSpoolFile(), this file is deleted automatically.

◆ stealSpoolFile()

void Wt::Http::UploadedFile::stealSpoolFile ( ) const

Steals the uploaded spool file.

By stealing the spooled file, it is no longer automatically deleted by Wt.


Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13