summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rw-r--r--indra/newview/llviewermenufile.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index eec6c8f481..2b69c20d15 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -541,6 +541,21 @@ void upload_new_resource(const LLString& src_filename, std::string name,
return;
}
}
+ else if( LLString::compareInsensitive(ext.c_str(),".png") == 0 )
+ {
+ asset_type = LLAssetType::AT_TEXTURE;
+ if (!LLViewerImageList::createUploadFile(src_filename,
+ filename,
+ IMG_CODEC_PNG ))
+ {
+ sprintf(error_message, "Problem with file %s:\n\n%s\n",
+ src_filename.c_str(), LLImageBase::getLastError().c_str());
+ args["[FILE]"] = src_filename;
+ args["[ERROR]"] = LLImageBase::getLastError();
+ upload_error(error_message, "ProblemWithFile", filename, args);
+ return;
+ }
+ }
else if(LLString::compareInsensitive(ext.c_str(),".wav") == 0)
{
asset_type = LLAssetType::AT_SOUND; // tag it as audio