feat: 
Allow Only Supported Image File Formats

Created by: dasari810

Pullrequest

-
to automatically filter only the supported image file formats when the user uploads the image for creating post
-
to give an error message if an unsupported file format is uploaded ( post will not be created )
Issues
- fixes #3923 (closed)
Todo
-
None
Merge request reports
Activity
Filter activity
27 27 beforeEach(() => jest.useFakeTimers()) 28 28 const message = 'File upload failed' 29 29 const fileError = { status: 'error' } 30 const unSupportedFileMessage = 31 'Please upload an image of file format : jpg , jpeg , png or gif' 30 32 31 33 it('shows an error toaster when verror is called', () => { 32 34 wrapper.vm.onDropzoneError(fileError, message) 33 35 expect(mocks.$toast.error).toHaveBeenCalledWith(fileError.status, message) 34 36 }) 37 it('shows an error toaster when unSupported file is uploaded', () => { Created by: Tirokk
Review: Approved
Hey cool @dasari810 , thanks for contributing again !!!
A nice next step for a better user experience!
PS: I allowed my self to add the German language and add the branch
3921-set-up-travis-builds
so that the Travis builds can run now …PPS: In case you are keen on being perfect: There are two toast messages if an error occurs. But I already approved your PR …
Please register or sign in to reply