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

Remove download links from user-uploaded attachments without thumbnails #2262

Merged
merged 6 commits into from
Aug 6, 2019

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Aug 2, 2019

Fixes #2248.

Changelog Entry

Fixed

  • Fix #2248. Remove download links from user-uploaded attachment without thumbnails, by @compulim in PR #2262

Description

We disabled links to user-uploaded attachment on our servers. This PR disable the links on the client if the attachment does not have a thumbnail. The thumbnail work is in PR #2206.

It would looks like this:

image

Specific Changes

  • Add new UploadAttachment renderer, which is very similar to DownloadAttachment but without links
  • Insert UploadAttachment in the attachment middleware, will use the renderer if the attachment is from user and does not have a thumbnail

  • Testing Added

@coveralls
Copy link

coveralls commented Aug 2, 2019

Coverage Status

Coverage increased (+0.007%) to 65.578% when pulling bf67bf3 on compulim:fix-2248 into 8faf2bc on microsoft:master.

@corinagum
Copy link
Contributor

We probably need tests. Should all current tests be passing right now?

Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

LGTM

@compulim
Copy link
Contributor Author

compulim commented Aug 5, 2019

Should wait until #2206 is merged.

@compulim compulim merged commit cac4cdb into microsoft:master Aug 6, 2019
@compulim compulim deleted the fix-2248 branch August 6, 2019 00:54
@compulim compulim mentioned this pull request Aug 22, 2019
@narik1989
Copy link

Hi,

What is the solution for this to work? i am using the latest webchat.js in my web chat and still i see the download icon for the uploaded documents. Can anyone provide me some help here.

enableUploadThumbnail is set to false. Do i have to add anything else to style options or am i missing something here?

@corinagum
Copy link
Contributor

If you need these changes immediately, please see our documentation on pointing to our MyGet feed for latest bits.

@compulim compulim mentioned this pull request Oct 4, 2019
13 tasks
compulim added a commit to compulim/BotFramework-WebChat that referenced this pull request Oct 5, 2019
…ls (microsoft#2262)

* Add upload attachment renderer

* Check thumbnail

* Update PR number

* Fix propTypes

* Fix render error for text attachment

* Update non-photo upload PNGs
@compulim compulim mentioned this pull request Oct 25, 2019
55 tasks
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.

Remove download link from user uploaded attachments
4 participants