Skip to content

Meteor files 2.2.1 fixes + attachment view#4638

Merged
xet7 merged 5 commits intowekan:masterfrom
mfilser:meteor_files_2.2.1
Aug 16, 2022
Merged

Meteor files 2.2.1 fixes + attachment view#4638
xet7 merged 5 commits intowekan:masterfrom
mfilser:meteor_files_2.2.1

Conversation

@mfilser
Copy link
Copy Markdown
Contributor

@mfilser mfilser commented Aug 16, 2022

fixes #4629

const fileObj = Attachments.findOne({_id: fileObjId});
moveToStorage(fileObj, storageDestination, fileStoreStrategyFactory);

// since Meteor-Files 2.1.0 the filename is truncated to 28 characters, so rename the file after upload to the right filename back
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfilser @xet7 I'm open to have a pass-through option for sanitization. Believe me there are not pleasant and real cases behind this sanitization

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like an option to overwrite and pass your own sanitize method into the FilesCollection constructor

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dr-dimitru

Yes, it would be very nice. Also new feature for checking uploaded attachments for viruses etc would expect filenames to be sanitized:

#4637

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also WeKan setting to validate attachment by file size and type:

#4618

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfilser

What do you think, would that sanitize method of FilesCollection constructor be better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xet7 @dr-dimitru
That would be great to have additional options at config variable of FilesCollection constructor

@dr-dimitru
Thank you very much for your great framework, without it, it would be much more diffucult or impossible to make all this features in Wekan !

@dr-dimitru
Copy link
Copy Markdown

@mfilser @xet7 done in v2.3.0

See example and recommended usage here

@mfilser
Copy link
Copy Markdown
Contributor Author

mfilser commented Aug 17, 2022

@dr-dimitru
Thank you very much. I will have a look at it and integrate the new option into Wekan.

@gerroon
Copy link
Copy Markdown

gerroon commented Aug 25, 2022

@mfilser

Is this related to this issue as well? Some users cant see the cover attachments.

https://github.com/wekan/wekan/discussions/4441

@mfilser
Copy link
Copy Markdown
Contributor Author

mfilser commented Aug 25, 2022

@gerroon
Idk, but i assume not.

@xet7
Copy link
Copy Markdown
Member

xet7 commented Aug 25, 2022

@gerroon

Attachment view is related to bringing back swipebox, so when clicking attachment bitmap image PNG/JPG/GIF etc, it opens to fullscreen view of bitmap image.

Not seeing attachments is #4644 , it's because some attachment migrations from CollectionFS to Meteor-Files are incomplete, attachments have wrong URLs, so they are not visible. Attachments are still at MongoDB database, and can be viewed with nosqlbooster.

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.

[Bug] Avatar Image broken for v6.10 and onwards [Docker Engine] [Linux]

4 participants