mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-13 06:52:39 +03:00
[CSE] Request the Folder ID.
This commit is contained in:
parent
4878e824e5
commit
76916b6c48
2 changed files with 20 additions and 1 deletions
|
@ -229,8 +229,15 @@ void PropagateUploadFileCommon::slotFolderEncryptedStatusFetched(const QMap<QStr
|
|||
|
||||
qDebug() << "###################################";
|
||||
qDebug() << "Retrieved correctly the encrypted status of the folders." << result;
|
||||
|
||||
/* We are inside an encrypted folder, we need to find it's Id. */
|
||||
if (result[currFilePath] == true) {
|
||||
qDebug() << "Uploading to an encrypted folder. do the thing.";
|
||||
QFileInfo info(_item->_file);
|
||||
LsColJob *job = new LsColJob(propagator()->account(), info.path(), this);
|
||||
job->setProperties({"resourcetype", "http://owncloud.org/ns:fileid"});
|
||||
connect(job, &LsColJob::directoryListingSubfolders, this, &PropagateUploadFileCommon::slotFolderEncryptedIdReceived);
|
||||
connect(job, &LsColJob::finishedWithError, this, &PropagateUploadFileCommon::slotFolderEncryptedIdError);
|
||||
job->start();
|
||||
} else {
|
||||
_fileToUpload._file = _item->_file;
|
||||
_fileToUpload._size = _item->_size;
|
||||
|
@ -240,6 +247,16 @@ void PropagateUploadFileCommon::slotFolderEncryptedStatusFetched(const QMap<QStr
|
|||
}
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotFolderEncryptedIdReceived(const QStringList &list)
|
||||
{
|
||||
qDebug() << "Successfully retrieved the id of the encrypted folder" << list;
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotFolderEncryptedIdError(QNetworkReply *r)
|
||||
{
|
||||
qDebug() << "Error retrieving the Id of the encrypted folder.";
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotFolderEncryptedStatusError(int error)
|
||||
{
|
||||
qDebug() << "Failed to retrieve the status of the folders." << error;
|
||||
|
|
|
@ -281,6 +281,8 @@ private slots:
|
|||
// Encryption Stuff
|
||||
void slotFolderEncryptedStatusFetched(const QMap<QString, bool>& result);
|
||||
void slotFolderEncryptedStatusError(int error);
|
||||
void slotFolderEncryptedIdReceived(const QStringList &list);
|
||||
void slotFolderEncryptedIdError(QNetworkReply *r);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue