-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upload media files #61
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wip fontawesome icons & message component render
- Simplify sendMedia params - Use mediaType from props instead of state (so remove it from the state) - Fix issue where `handleSubscribe` would always call `sendMessage` - FontAwesome icon for download button
Also upgrade fontawesome so we could use the `faFileLines`
… feature/uploadMediaFiles # Conflicts: # cypress/e2e/ui_spec.js # src/UI/Message.jsx
…+ tests Also fixed an issue with boolean settings. If you supplied `false` as the value, the default value would trigger due to the `value || default` statement. I changed it to check if it is a boolean and if so, it never uses the default.
daanleenders
requested changes
May 22, 2024
Also added a loading animation while the media file is downloading.
The `document.createElement` already adds the element to the dom.
Switch doesnt work with the `startsWith()` cases
daanleenders
approved these changes
May 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the possibility to upload files and receive files.
The mime type of the files you can upload are defined here: https://api.parley.nu/clientApi/latest/doc/#operation/PostMedia under de
media
property.This also adds 2 new settings:
window.parleySettings.runOptions.allowFileUpload
, this works the same as the one in v1. It shows/hides the upload button.window.parleySettings.runOptions.allowedMediaTypes
, this one is new. It allows you to change the allowed mime types that are used in the upload file dialog. It is an array which can contain a subset of ourSUPPORTED_MEDIA_TYPES
, other types are not allowed.The docs are already updated for these 2 settings https://developers.parley.nu/docs/settings-2#runoptions