-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat(safer): validate files with Safer #4421
Conversation
<ui-image-container | ||
v-else | ||
class="image-container" | ||
:nsfw="image.nsfw && blockNsfw" |
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.
we need to check the blockNsfw user setting to determine whether they want to see nsfw content. This current change would always blur if its nsfw, regardless of user setting. Although, we could probably add the settings check to the image-container component, rather than doing it at the parent level every time
-- edit: I now see this specific component was referencing the old textile state. example of new implementation can be found here
components/views/chat/chatbar/upload/preview/item/Item.vue
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.
Thanks @josephmcg for the review, I haven't looked at the front-end side of Safer yet, this was just me working around enabling a user to send a file in chat so I can test the iridium side, since that wasn't fully working at the time of this branch's creation. but I will look into the new implementation you suggested soon. 👍🏻 Thanks again!
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.
If this doesn't break anything I would be in favor of merging it and following up with another UI ticket
why switch thumbnail from cid to the blob itself? the utility function only returns a scaled down version in the case of image files. If no thumbnail can be generated, it returns undefined. This has potential to store undefined inside iridium (which I believe breaks things) |
For the thumbnail, my thought was to not store 2 files ( original image + thumbnail ) in the sync-node . Instead I thought thumbnails should only be a manager/front-end utility that resizes the original image we store in sync-node imo. right? |
Maybe thumbnail shouldn't be in the attachment all together... I don't know! |
Which issue(s) this PR fixes 🔨
AP-2186