some more work about uploading, not done yet

This commit is contained in:
Blue 2019-11-09 17:04:27 +03:00
parent 09749bac51
commit 3f710e26d0
5 changed files with 164 additions and 16 deletions

View file

@ -47,12 +47,17 @@ public:
void start();
void stop();
QString getFileRemoteUrl(const QString& path);
bool isUploading(const QString& path, const QString& messageId = "");
void uploadFile(const QString& messageId, const QString& path, const QUrl& put, const QUrl& get, const QMap<QString, QString> headers);
signals:
void fileLocalPathResponse(const QString& messageId, const QString& path);
void downloadFileProgress(const QString& messageId, qreal value);
void downloadFileError(const QString& messageId, const QString& path);
void uploadFileProgress(const QString& messageId, qreal value);
void uploadFileError(const QString& messageId, const QString& path);
void uploadFileComplete(const QString& messageId, const QString& url);
public slots:
void fileLocalPathRequest(const QString& messageId, const QString& url);
@ -85,6 +90,7 @@ private:
QNetworkReply* reply;
bool success;
QString path;
QString url;
QFile* file;
};
};