force asset upload to use a lowercase extension

This commit is contained in:
Stephen Birarda 2015-12-07 15:18:32 -08:00
parent 0fee004bdd
commit 7beaf5e235
2 changed files with 3 additions and 1 deletions

View file

@ -4234,7 +4234,8 @@ void Application::modelUploadFinished(AssetUpload* upload, const QString& hash)
auto filename = QFileInfo(upload->getFilename()).fileName();
if ((upload->getError() == AssetUpload::NoError) &&
(filename.endsWith(FBX_EXTENSION, Qt::CaseInsensitive) || filename.endsWith(OBJ_EXTENSION, Qt::CaseInsensitive))) {
(upload->getExtension().endsWith(FBX_EXTENSION, Qt::CaseInsensitive) ||
upload->getExtension().endsWith(OBJ_EXTENSION, Qt::CaseInsensitive))) {
auto entities = DependencyManager::get<EntityScriptingInterface>();

View file

@ -63,6 +63,7 @@ void AssetUpload::start() {
// file opened, read the data and grab the extension
_extension = QFileInfo(_filename).suffix();
_extension = _extension.toLower();
_data = file.readAll();
} else {