-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Importers no longer working due to the FileUpload changes #9850
[FIX] Importers no longer working due to the FileUpload changes #9850
Conversation
try { | ||
maxFileSize = parseInt(value); | ||
} catch (e) { | ||
maxFileSize = 2097152; // the default value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyway to maybe fetch that? Do we want to have this value hard coded here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is returned when the setting is updated. Should they manage to set an invalid integer as the value of that setting (which shouldn't happen in theory) then this is a fail safe and thus I believe hard coded is just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I understand when it's returned. My question is instead of hard coding would it be possible to grab the settings default value? Another words grab from the other place it's hard coded so we don't have it a second place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure we can, I'm just not sure the best way of doing it. Recommendations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea 😛 so I guess proceed 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@graywolf336 You can do RocketChat.models.Settings.findOneById('FileUpload_MaxFileSize').packageValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah derp, I completely forgot about that.
@RocketChat/core
Closes #9577 and adds
-1
to resemble no limit to file upload size.