Skip to content

Commit

Permalink
Folder Upload (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunk authored Aug 10, 2023
1 parent 79bcc5f commit 3c378ec
Show file tree
Hide file tree
Showing 4 changed files with 444 additions and 65 deletions.
20 changes: 17 additions & 3 deletions src/QtBase/Backend/FilesCreateResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ using namespace Core;
// constructor
FilesCreateResponse::FilesCreateResponse(QNetworkReply* reply) : Response(reply)
{
// check for errors
if (mHasError == true)
return;
// data
Json::Item dataItem = mJson.Find("data");
if (dataItem.IsNull() == true)
{
mHasError = true;
return;
}

// get the data chunk id
Json::Item fileIdItem = dataItem.Find("fileId");
if (fileIdItem.IsNull() == true)
{
mHasError = true;
return;
}

mFileId = fileIdItem.GetString();
}
2 changes: 2 additions & 0 deletions src/QtBase/Backend/FilesCreateResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class QTBASE_API FilesCreateResponse : public Response
public:
// constructor
FilesCreateResponse(QNetworkReply* reply);

const char* mFileId;
};


Expand Down
Loading

0 comments on commit 3c378ec

Please sign in to comment.