Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/file-upload/server/lib/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const FileUpload = {
};

const reorientation = (cb) => {
if (!metadata.orientation) {
if (!metadata.orientation || metadata.orientation === 1 || settings.get('FileUpload_RotateImages') !== true) {
return cb();
}
s.rotate()
Expand Down
6 changes: 6 additions & 0 deletions app/file-upload/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ settings.addGroup('FileUpload', function() {
i18nDescription: 'FileUpload_ProtectFilesDescription',
});

this.add('FileUpload_RotateImages', true, {
Comment thread
rodrigok marked this conversation as resolved.
type: 'boolean',
public: true,
Comment thread
rodrigok marked this conversation as resolved.
Outdated
i18nDescription: 'FileUpload_RotateImagesDescription',
});

this.add('FileUpload_Enable_json_web_token_for_files', true, {
type: 'boolean',
i18nLabel: 'FileUpload_Enable_json_web_token_for_files',
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,7 @@
"FileUpload_MediaTypeWhiteListDescription": "Comma-separated list of media types. Leave it blank for accepting all media types.",
"FileUpload_ProtectFiles": "Protect Uploaded Files",
"FileUpload_ProtectFilesDescription": "Only authenticated users will have access",
"FileUpload_RotateImagesDescription": "Rotate images on upload (may cause image quality loss)",
"FileUpload_S3_Acl": "Acl",
"FileUpload_S3_AWSAccessKeyId": "Access Key",
"FileUpload_S3_AWSSecretAccessKey": "Secret Key",
Expand Down