mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +02:00
fix for file upload to ATP on Windows
This commit is contained in:
parent
ba5109c458
commit
5ebc8d6036
1 changed files with 3 additions and 3 deletions
|
@ -39,13 +39,13 @@ void AssetUploadDialogFactory::showDialog() {
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
||||||
if (nodeList->getThisNodeCanRez()) {
|
if (nodeList->getThisNodeCanRez()) {
|
||||||
auto filename = QFileDialog::getOpenFileUrl(_dialogParent, "Select a file to upload");
|
auto filename = QFileDialog::getOpenFileName(_dialogParent, "Select a file to upload");
|
||||||
|
|
||||||
if (!filename.isEmpty()) {
|
if (!filename.isEmpty()) {
|
||||||
qDebug() << "Selected filename for upload to asset-server: " << filename;
|
qDebug() << "Selected filename for upload to asset-server: " << filename;
|
||||||
|
|
||||||
auto assetClient = DependencyManager::get<AssetClient>();
|
auto assetClient = DependencyManager::get<AssetClient>();
|
||||||
auto upload = assetClient->createUpload(filename.path());
|
auto upload = assetClient->createUpload(filename);
|
||||||
|
|
||||||
if (upload) {
|
if (upload) {
|
||||||
// connect to the finished signal so we know when the AssetUpload is done
|
// connect to the finished signal so we know when the AssetUpload is done
|
||||||
|
@ -56,7 +56,7 @@ void AssetUploadDialogFactory::showDialog() {
|
||||||
} else {
|
} else {
|
||||||
// show a QMessageBox to say that there is no local asset server
|
// show a QMessageBox to say that there is no local asset server
|
||||||
QString messageBoxText = QString("Could not upload \n\n%1\n\nbecause you are currently not connected" \
|
QString messageBoxText = QString("Could not upload \n\n%1\n\nbecause you are currently not connected" \
|
||||||
" to a local asset-server.").arg(QFileInfo(filename.toString()).fileName());
|
" to a local asset-server.").arg(QFileInfo(filename).fileName());
|
||||||
|
|
||||||
QMessageBox::information(_dialogParent, "Failed to Upload", messageBoxText);
|
QMessageBox::information(_dialogParent, "Failed to Upload", messageBoxText);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue