[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.
Is there anyway to maybe fetch that? Do we want to have this value hard coded here?
There was a problem hiding this comment.
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.
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.
Sure we can, I'm just not sure the best way of doing it. Recommendations?
There was a problem hiding this comment.
no idea 😛 so I guess proceed 😄
There was a problem hiding this comment.
@graywolf336 You can do RocketChat.models.Settings.findOneById('FileUpload_MaxFileSize').packageValue
There was a problem hiding this comment.
Ah derp, I completely forgot about that.
@RocketChat/core
Closes #9577 and adds
-1to resemble no limit to file upload size.