Showing the changes to interface/src/Menu.cpp (1 of 1 file). Show all
Unified · Split
| @@ -104,11 +104,11 @@ Menu::Menu() { · 103 unmodified lines | |||
| 104 | qDebug() << "Selected: " << filename; | 104 | qDebug() << "Selected: " << filename; |
| 105 | QFile file { filename.path() }; | 105 | QFile file { filename.path() }; |
| 106 | if (file.open(QIODevice::ReadOnly)) { | 106 | if (file.open(QIODevice::ReadOnly)) { |
| 107 | auto fileInfo { filename.path() }; | 107 | QFileInfo fileInfo { filename.path() }; |
| 108 | auto extension = fileInfo.suffix(); | 108 | auto extension = fileInfo.suffix(); |
| 109 | auto data = file.readAll(); | 109 | auto data = file.readAll(); |
| 110 | auto assetClient = DependencyManager::get<AssetClient>(); | 110 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 111 | assetClient->uploadAsset(data, extension, [this](bool result, QString hash) mutable { | 111 | assetClient->uploadAsset(data, extension, [this, extension](bool result, QString hash) mutable { |
| 112 | if (result) { | 112 | if (result) { |
| 113 | QMessageBox::information(this, "Upload Successful", "URL: apt:/" + hash + "." + extension); | 113 | QMessageBox::information(this, "Upload Successful", "URL: apt:/" + hash + "." + extension); |
| 114 | } else { | 114 | } else { |