diff options
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_ft.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index e0f17beb94..b3e3845692 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -127,6 +127,12 @@ void CJabberProto::FtInitiate(filetransfer *ft) struct _stat64 st;
_wstat64(ft->std.szCurrentFile.w, &st);
+ uint32_t maxsize = getDword("HttpUploadMaxSize");
+ if (maxsize && st.st_size > maxsize) {
+ MsgPopup(ft->std.hContact, CMStringW(FORMAT, TranslateT("%s is too large. Maximum size supported by the service is %d KB"), ft->std.szCurrentFile.w, maxsize), L"HTTP Upload");
+ goto LBL_Error;
+ }
+
auto *pwszContentType = ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(ft->std.szCurrentFile.w));
if (pwszContentType == nullptr)
pwszContentType = "application/octet-stream";
|