Cutelyst  1.7.0
Public Member Functions | Protected Member Functions | List of all members
Cutelyst::Upload Class Reference

Cutelyst Upload handles file upload request More...

#include <Cutelyst/Upload>

Inheritance diagram for Cutelyst::Upload:
Inheritance graph
[legend]

Public Member Functions

 Upload (UploadPrivate *prv)
 
QString contentType () const
 
QTemporaryFile * createTemporaryFile (const QString &templateName=QString())
 
QString filename () const
 
Headers headers () const
 
QString name () const
 
virtual qint64 pos () const override
 
bool save (const QString &filename)
 
virtual bool seek (qint64 pos) override
 
virtual qint64 size () const override
 

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxlen) override
 
virtual qint64 readLineData (char *data, qint64 maxlen) override
 
virtual qint64 writeData (const char *data, qint64 maxSize) override
 

Detailed Description

Definition at line 37 of file upload.h.

Constructor & Destructor Documentation

Cutelyst::Upload::Upload ( UploadPrivate *  prv)

This class provides access to client upload requests

Member Function Documentation

QString Cutelyst::Upload::contentType ( ) const

Returns the content type provided by the user agent

QTemporaryFile* Cutelyst::Upload::createTemporaryFile ( const QString &  templateName = QString())

This function creates a temporary file and fill it with the content of this upload. Returns zero if an error occours.

QString Cutelyst::Upload::filename ( ) const

Returns the file name provided by the user agent

Headers Cutelyst::Upload::headers ( ) const

Returns the headers provided by the user agent

QString Cutelyst::Upload::name ( ) const

Returns the name of the form field

virtual qint64 Cutelyst::Upload::pos ( ) const
overridevirtual

Reimplemented from QIODevice::pos().

virtual qint64 Cutelyst::Upload::readData ( char *  data,
qint64  maxlen 
)
overrideprotectedvirtual

Reimplemented from QIODevice::readData().

virtual qint64 Cutelyst::Upload::readLineData ( char *  data,
qint64  maxlen 
)
overrideprotectedvirtual

Reimplemented from QIODevice::readLineData().

bool Cutelyst::Upload::save ( const QString &  filename)

Saves this upload to the following location.

virtual bool Cutelyst::Upload::seek ( qint64  pos)
overridevirtual

Reimplemented from QIODevice::seek().

virtual qint64 Cutelyst::Upload::size ( ) const
overridevirtual

Reimplemented from QIODevice::size().

virtual qint64 Cutelyst::Upload::writeData ( const char *  data,
qint64  maxSize 
)
overrideprotectedvirtual

Reimplemented from QIODevice::writeData().