#include <tmultipartformdata.h>
|
static const QFile::Permissions | DefaultPermissions = QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther |
|
|
void | parse (QIODevice *dev, TActionContext *context) |
|
The TMultipartFormData represents a media-type multipart/form-data.
◆ TMultipartFormData() [1/3]
TMultipartFormData::TMultipartFormData |
( |
const QByteArray & |
boundary = QByteArray() | ) |
|
Constructs a empty multipart/form-data object with the boundary boundary.
◆ TMultipartFormData() [2/3]
TMultipartFormData::TMultipartFormData |
( |
const QByteArray & |
formData, |
|
|
const QByteArray & |
boundary, |
|
|
TActionContext * |
context |
|
) |
| |
Constructs a multipart/form-data object by parsing formData with the boundary boundary.
◆ TMultipartFormData() [3/3]
TMultipartFormData::TMultipartFormData |
( |
const QString & |
bodyFilePath, |
|
|
const QByteArray & |
boundary, |
|
|
TActionContext * |
context |
|
) |
| |
Constructs a multipart/form-data object by parsing the content of the file with the given bodyFilePath.
◆ ~TMultipartFormData()
TMultipartFormData::~TMultipartFormData |
( |
| ) |
|
|
inline |
◆ allFormItemValues()
QStringList TMultipartFormData::allFormItemValues |
( |
const QString & |
name | ) |
const |
Returns a list of form string values whose name is equal to name from the multipart/form-data.
◆ clear()
void TMultipartFormData::clear |
( |
| ) |
|
◆ contentType()
QString TMultipartFormData::contentType |
( |
const QByteArray & |
dataName | ) |
const |
Returns the value of the header field content-type in the MIME entity associated with the name dataName.
◆ entity()
TMimeEntity TMultipartFormData::entity |
( |
const QByteArray & |
dataName | ) |
const |
Returns the MIME entity object associated with the name dataName.
◆ entityList()
QList< TMimeEntity > TMultipartFormData::entityList |
( |
const QByteArray & |
dataName | ) |
const |
Returns a list of the MIME entity objects associated with the name dataName.
◆ formItems() [1/2]
QVariantMap TMultipartFormData::formItems |
( |
| ) |
const |
Returns a QVariantMap object with the form items of this multipart/form-data.
◆ formItems() [2/2]
QVariantMap TMultipartFormData::formItems |
( |
const QString & |
key | ) |
const |
Returns the map of variant value whose key is equal to key from the multipart/form-data.
◆ formItemValue()
QString TMultipartFormData::formItemValue |
( |
const QString & |
name | ) |
const |
Returns the first form string value whose name is equal to name from the multipart/form-data.
◆ formItemVariantList()
QVariantList TMultipartFormData::formItemVariantList |
( |
const QString & |
key | ) |
const |
◆ hasEntity()
bool TMultipartFormData::hasEntity |
( |
const QByteArray & |
dataName | ) |
const |
Returns true if the MIME entity object associated with the name dataName exists; otherwise false.
◆ hasFormItem()
bool TMultipartFormData::hasFormItem |
( |
const QString & |
name | ) |
const |
Returns true if there is a string pair whose name is equal to name from the multipart/form-data; otherwise returns false.
◆ isEmpty()
bool TMultipartFormData::isEmpty |
( |
| ) |
const |
Returns true if the multipart/form-data object has no data; otherwise returns false.
◆ originalFileName()
QString TMultipartFormData::originalFileName |
( |
const QByteArray & |
dataName | ) |
const |
Returns the original name of the file contained in the MIME entity associated with the name dataName.
◆ parse()
void TMultipartFormData::parse |
( |
QIODevice * |
dev, |
|
|
TActionContext * |
context |
|
) |
| |
|
protected |
Reads from the I/O device dev and parses it.
◆ renameUploadedFile()
bool TMultipartFormData::renameUploadedFile |
( |
const QByteArray & |
dataName, |
|
|
const QString & |
newName, |
|
|
bool |
overwrite = false , |
|
|
QFile::Permissions |
permissions = DefaultPermissions |
|
) |
| |
Renames the file contained in the MIME entity associated with the name dataName.
- Warning
- Note that this method must not be called more than once.
- See also
- TMimeEntity::renameUploadedFile()
◆ size()
int64_t TMultipartFormData::size |
( |
const QByteArray & |
dataName | ) |
const |
Returns the size of the file contained in the MIME entity associated with the name dataName.
- Warning
- Note that this method must be called before renameUploadedFile() method calls.
◆ uploadedFilePath()
QString TMultipartFormData::uploadedFilePath |
( |
const QByteArray & |
dataName | ) |
const |
Returns the path of the temporary file contained in the MIME entity associated with the name dataName, including the absolute path.
◆ THttpRequest
◆ DefaultPermissions
const QFile::Permissions TMultipartFormData::DefaultPermissions = QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther |
|
static |
The documentation for this class was generated from the following files: