Skip to content
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

Merged
merged 3 commits into from
Feb 26, 2018

Conversation

graywolf336
Copy link
Contributor

@RocketChat/core

Closes #9577 and adds -1 to resemble no limit to file upload size.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9850 February 22, 2018 21:45 Inactive
@rodrigok rodrigok added this to the 0.62.0 milestone Feb 22, 2018
try {
maxFileSize = parseInt(value);
} catch (e) {
maxFileSize = 2097152; // the default value
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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 😄

Copy link
Member

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

Copy link
Contributor Author

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.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9850 February 26, 2018 16:02 Inactive
@rodrigok rodrigok merged commit 4cdb12d into develop Feb 26, 2018
@rodrigok rodrigok deleted the allow-unlimited-file-size_fix-slack-importer branch February 26, 2018 17:19
@rodrigok rodrigok mentioned this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slack import fails due to file size greater than 0
4 participants