Simplify Upload and Download
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Net {
|
||||
auto ApiDownload::makeCached(QUrl url, MetaEntryPtr entry, Options options) -> Download::Ptr
|
||||
{
|
||||
auto dl = makeShared<ApiDownload>();
|
||||
dl->logCat = taskDownloadLogC;
|
||||
dl->m_url = url;
|
||||
dl->setObjectName(QString("CACHE:") + url.toString());
|
||||
dl->m_options = options;
|
||||
@@ -40,6 +41,7 @@ auto ApiDownload::makeCached(QUrl url, MetaEntryPtr entry, Options options) -> D
|
||||
auto ApiDownload::makeByteArray(QUrl url, std::shared_ptr<QByteArray> output, Options options) -> Download::Ptr
|
||||
{
|
||||
auto dl = makeShared<ApiDownload>();
|
||||
dl->logCat = taskDownloadLogC;
|
||||
dl->m_url = url;
|
||||
dl->setObjectName(QString("BYTES:") + url.toString());
|
||||
dl->m_options = options;
|
||||
@@ -50,6 +52,7 @@ auto ApiDownload::makeByteArray(QUrl url, std::shared_ptr<QByteArray> output, Op
|
||||
auto ApiDownload::makeFile(QUrl url, QString path, Options options) -> Download::Ptr
|
||||
{
|
||||
auto dl = makeShared<ApiDownload>();
|
||||
dl->logCat = taskDownloadLogC;
|
||||
dl->m_url = url;
|
||||
dl->setObjectName(QString("FILE:") + url.toString());
|
||||
dl->m_options = options;
|
||||
|
||||
Reference in New Issue
Block a user