From 821a7314b13127d0896fe0ba59ac3567b58245cc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 3 Sep 2024 12:55:59 +0300 Subject: viewer#2311 Message about oversized snapshots wasn't shown in some cases --- indra/newview/llwebprofile.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index feb5ecb1fb..4528ad012d 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -133,12 +133,12 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin if (!status) { + LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL; + LLWebProfile::reportImageUploadStatus(false); if (image->getDataSize() > MAX_WEB_DATASIZE) { LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig"); } - LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL; - LLWebProfile::reportImageUploadStatus(false); return; } @@ -166,6 +166,10 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin { LL_WARNS("Snapshots") << "Failed to upload image data." << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); + if (image->getDataSize() > MAX_WEB_DATASIZE) + { + LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig"); + } return; } @@ -193,6 +197,10 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin { LL_WARNS("Snapshots") << "Failed to upload image." << LL_ENDL; LLWebProfile::reportImageUploadStatus(false); + if (image->getDataSize() > MAX_WEB_DATASIZE) + { + LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig"); + } return; } @@ -201,8 +209,6 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin LL_INFOS("Snapshots") << "Image uploaded." << LL_ENDL; //LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << raw.asString() << "]" << LL_ENDL; LLWebProfile::reportImageUploadStatus(true); - - } /*static*/ -- cgit v1.2.3