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

feat(channel-web): allow usage of contentElement for fileUpload message #1769

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

davidvitora
Copy link
Contributor

@davidvitora davidvitora commented Sep 21, 2023

Adds a channel-web module configuration variable "uploadsFileUploadedTextContentElement" that allows specifying a text content element to be rendered and sent to the user after a file upload (by default, it sends "Uploaded a file originalName")

OBS: Only set it on the bot-scoped channel-web configuration since content element IDs are specific for each bot (right-click on the global config file and 'Duplicate to current bot').

image

To use, create a builtin_text content element:

image

After, get the content element id, for example: "#!builtin_text-OzpN5X" (only builtin_text contentElements are supported)

Variables available:

storage: 'local' or 's3'
url: URL where the file has been uploaded
originalName: Name that the file had on the user's computer
mime: mime type of the file, example: 'image/gif'
size: size from the file in bytes

User variables are also available at 'event.state.user' (only user variables are supported)

image

Content Element Multilanguage is also supported:

image

@davidvitora davidvitora merged commit 902f02d into master Sep 25, 2023
4 of 7 checks passed
@davidvitora davidvitora deleted the dv_translate_uploaded_file branch September 25, 2023 17:52
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.

1 participant