Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
bcada5de
Commit
bcada5de
authored
Aug 23, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Chat): disable file size limitation (close #66)
parent
b88235a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
ChatModel.cpp
src/components/chat/ChatModel.cpp
+11
-5
No files found.
src/components/chat/ChatModel.cpp
View file @
bcada5de
...
@@ -41,7 +41,10 @@
...
@@ -41,7 +41,10 @@
#define THUMBNAIL_IMAGE_FILE_HEIGHT 100
#define THUMBNAIL_IMAGE_FILE_HEIGHT 100
#define THUMBNAIL_IMAGE_FILE_WIDTH 100
#define THUMBNAIL_IMAGE_FILE_WIDTH 100
// In Bytes.
// Not enabled by default.
#define LIMIT_FILE_SIZE 0
// In Bytes. (500)
#define FILE_SIZE_LIMIT 524288000
#define FILE_SIZE_LIMIT 524288000
using
namespace
std
;
using
namespace
std
;
...
@@ -387,10 +390,13 @@ void ChatModel::sendFileMessage (const QString &path) {
...
@@ -387,10 +390,13 @@ void ChatModel::sendFileMessage (const QString &path) {
return
;
return
;
qint64
fileSize
=
file
.
size
();
qint64
fileSize
=
file
.
size
();
if
(
fileSize
>
FILE_SIZE_LIMIT
)
{
qWarning
()
<<
QStringLiteral
(
"Unable to send file. (Size limit=%1)"
).
arg
(
FILE_SIZE_LIMIT
);
#if LIMIT_FILE_SIZE
return
;
if
(
fileSize
>
FILE_SIZE_LIMIT
)
{
}
qWarning
()
<<
QStringLiteral
(
"Unable to send file. (Size limit=%1)"
).
arg
(
FILE_SIZE_LIMIT
);
return
;
}
#endif
shared_ptr
<
linphone
::
Content
>
content
=
CoreManager
::
getInstance
()
->
getCore
()
->
createContent
();
shared_ptr
<
linphone
::
Content
>
content
=
CoreManager
::
getInstance
()
->
getCore
()
->
createContent
();
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment