mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-13 06:52:39 +03:00
[CSE] Start to create the upload logic.
This commit is contained in:
parent
8c4928d9f6
commit
387737d908
2 changed files with 26 additions and 4 deletions
|
@ -176,10 +176,30 @@ void PropagateUploadFileCommon::start()
|
|||
*
|
||||
* this by no means is a finished job, but a first step.
|
||||
*/
|
||||
_fileToUpload._file = _item->_file;
|
||||
_fileToUpload._size = _item->_size;
|
||||
_fileToUpload._path = propagator()->getFilePath(_fileToUpload._file);
|
||||
if (propagator()->account()->capabilities().clientSideEncryptionAvaliable()) {
|
||||
qDebug() << "Uploading to Remote Folder: " << propagator()->_remoteFolder;
|
||||
qDebug() << "Uploading from Local Dir" << propagator()->_localDir;
|
||||
qDebug() << "Local File" << _item->_file;
|
||||
qDebug() << QDir::cleanPath(propagator()->account()->url().path() + QLatin1Char('/')
|
||||
+ propagator()->account()->davPath() + propagator()->_remoteFolder + _item->_file);
|
||||
|
||||
//TODO: Those shall die.
|
||||
_fileToUpload._file = _item->_file;
|
||||
_fileToUpload._size = _item->_size;
|
||||
_fileToUpload._path = propagator()->getFilePath(_fileToUpload._file);
|
||||
} else {
|
||||
_fileToUpload._file = _item->_file;
|
||||
_fileToUpload._size = _item->_size;
|
||||
_fileToUpload._path = propagator()->getFilePath(_fileToUpload._file);
|
||||
startUploadRawFile();
|
||||
}
|
||||
}
|
||||
void PropageteUploadFileCommon::startUploadEncryptedFile()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::startUploadRawFile() {
|
||||
if (propagator()->_abortRequested.fetchAndAddRelaxed(0)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -250,8 +250,10 @@ public:
|
|||
*/
|
||||
void setDeleteExisting(bool enabled);
|
||||
|
||||
/* start should setup the file, path and size that will be send to the server */
|
||||
void start() Q_DECL_OVERRIDE;
|
||||
|
||||
void startUploadEncryptedFile();
|
||||
void startUploadRawFile();
|
||||
bool isLikelyFinishedQuickly() Q_DECL_OVERRIDE { return _item->_size < propagator()->smallFileSize(); }
|
||||
|
||||
private slots:
|
||||
|
|
Loading…
Reference in a new issue