History

client side fixes for upload with no extension

Stephen Birarda committed 10 years ago

Commit 8fa32e71 parent 1ece9aa4 files · +17 −11Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+3−3
@@ -4334,14 +4334,14 @@ void Application::modelUploadFinished(AssetUpload* upload, const QString& hash) · 4333 unmodified lines
4334 auto filename = QFileInfo(upload->getFilename()).fileName();4334 auto filename = QFileInfo(upload->getFilename()).fileName();
4335 4335
4336 if ((upload->getError() == AssetUpload::NoError) &&4336 if ((upload->getError() == AssetUpload::NoError) &&
4337 (FBX_EXTENSION.endsWith(upload->getExtension(), Qt::CaseInsensitive) ||4337 (filename.endsWith(FBX_EXTENSION, Qt::CaseInsensitive) ||
4338 OBJ_EXTENSION.endsWith(upload->getExtension(), Qt::CaseInsensitive))) {4338 filename.endsWith(OBJ_EXTENSION, Qt::CaseInsensitive))) {
4339 4339
4340 auto entities = DependencyManager::get<EntityScriptingInterface>();4340 auto entities = DependencyManager::get<EntityScriptingInterface>();
4341 4341
4342 EntityItemProperties properties;4342 EntityItemProperties properties;
4343 properties.setType(EntityTypes::Model);4343 properties.setType(EntityTypes::Model);
4344 properties.setModelURL(QString("%1:%2.%3").arg(URL_SCHEME_ATP).arg(hash).arg(upload->getExtension()));4344 properties.setModelURL(QString("%1:%2").arg(URL_SCHEME_ATP).arg(hash);
4345 properties.setPosition(_myCamera.getPosition() + _myCamera.getOrientation() * Vectors::FRONT * 2.0f);4345 properties.setPosition(_myCamera.getPosition() + _myCamera.getOrientation() * Vectors::FRONT * 2.0f);
4346 properties.setName(QUrl(upload->getFilename()).fileName());4346 properties.setName(QUrl(upload->getFilename()).fileName());
4347 4347

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t