chore: Allow more filetypes in uploads (#3557)

- Allowing the ability to upload more common file types like zip, Docx etc
- Fallback for image bubble when the image URL isn't available

fixes: #3270

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
Sojan Jose 2021-12-20 23:50:37 +05:30 committed by GitHub
parent 76e8acd3c6
commit 6fe5484119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 99 additions and 20 deletions

View file

@ -15,7 +15,7 @@
<file-upload
ref="upload"
:size="4096 * 4096"
accept="image/png, image/jpeg, image/gif, image/bmp, image/tiff, application/pdf, audio/mpeg, video/mp4, audio/ogg, text/csv"
:accept="allowedFileTypes"
:drop="true"
:drop-directory="false"
@input-file="onFileUpload"
@ -84,6 +84,7 @@ import {
hasPressedAltAndAKey,
} from 'shared/helpers/KeyboardHelpers';
import eventListenerMixins from 'shared/mixins/eventListenerMixins';
import { ALLOWED_FILE_TYPES } from 'shared/constants/messages';
import { REPLY_EDITOR_MODES } from './constants';
export default {
@ -161,6 +162,9 @@ export default {
showAttachButton() {
return this.showFileUpload || this.isNote;
},
allowedFileTypes() {
return ALLOWED_FILE_TYPES;
},
},
methods: {
handleKeyEvents(e) {