diff --git a/interface/src/ui/AssetUploadDialogFactory.cpp b/interface/src/ui/AssetUploadDialogFactory.cpp index 6edf71e758..3073171563 100644 --- a/interface/src/ui/AssetUploadDialogFactory.cpp +++ b/interface/src/ui/AssetUploadDialogFactory.cpp @@ -78,7 +78,7 @@ void AssetUploadDialogFactory::handleUploadFinished(AssetUpload* upload, const Q // setup the line edit to hold the copiable text QLineEdit* lineEdit = new QLineEdit; - QString atpURL = QString("%1://%2").arg(ATP_SCHEME).arg(hash); + QString atpURL = QString("%1://%2.%3").arg(ATP_SCHEME).arg(hash).arg(upload->getExtension); // set the ATP URL as the text value so it's copiable lineEdit->insert(atpURL); diff --git a/libraries/networking/src/AssetUpload.cpp b/libraries/networking/src/AssetUpload.cpp index b7c1fa1c34..c9f5b804d4 100644 --- a/libraries/networking/src/AssetUpload.cpp +++ b/libraries/networking/src/AssetUpload.cpp @@ -34,14 +34,14 @@ void AssetUpload::start() { if (file.open(QIODevice::ReadOnly)) { // file opened, read the data and grab the extension - auto extension = QFileInfo(_filename).suffix(); + _extension = QFileInfo(_filename).suffix(); auto data = file.readAll(); // ask the AssetClient to upload the asset and emit the proper signals from the passed callback auto assetClient = DependencyManager::get(); - assetClient->uploadAsset(data, extension, [this](bool success, QString hash){ + assetClient->uploadAsset(data, _extension, [this](bool success, QString hash){ if (success) { // successful upload - emit finished with a point to ourselves and the resulting hash _result = Success; diff --git a/libraries/networking/src/AssetUpload.h b/libraries/networking/src/AssetUpload.h index c969e4373e..f55f4f9b71 100644 --- a/libraries/networking/src/AssetUpload.h +++ b/libraries/networking/src/AssetUpload.h @@ -36,6 +36,7 @@ public: Q_INVOKABLE void start(); const QString& getFilename() const { return _filename; } + const QString& getExtension() const { return _extension; } const Result& getResult() const { return _result; } signals: @@ -44,6 +45,7 @@ signals: private: QString _filename; + QString _extension; Result _result; };