diff options
author | Rider Linden <rider@lindenlab.com> | 2015-06-30 17:11:10 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-06-30 17:11:10 -0700 |
commit | ddb63e7fb70eefea200fbb385efe86e50e5c1e12 (patch) | |
tree | bcb9e9cd8bd7094f2d4ec0f098735fd2935bb6b3 /indra/newview/llsnapshotlivepreview.cpp | |
parent | 08ef748cba55d5d950b224710c8592e94fcce5c7 (diff) |
Initial checkin for uploading via coroutine.
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 0ae8a338e0..bbf560f3fa 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1004,9 +1004,22 @@ void LLSnapshotLivePreview::saveTexture() LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - void *userdata = NULL; +#if 1 + std::string name = "Snapshot: " + pos_string; + std::string desc = "Taken by " + who_took_it + " at " + pos_string; + + NewResourceUploadInfo::ptr_t assetUploadInfo(new NewResourceUploadInfo(name, desc, 0, + LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, + PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), + name, expected_upload_cost)); + + upload_new_resource(tid, LLAssetType::AT_TEXTURE, assetUploadInfo); + +#else + LLAssetStorage::LLStoreAssetCallback callback = NULL; + void *userdata = NULL; + upload_new_resource(tid, // tid LLAssetType::AT_TEXTURE, "Snapshot : " + pos_string, @@ -1019,6 +1032,7 @@ void LLSnapshotLivePreview::saveTexture() LLFloaterPerms::getEveryonePerms("Uploads"), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); +#endif gViewerWindow->playSnapshotAnimAndSound(); } else |