Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Change getFileType function to fix issue #98 #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

murilobr
Copy link

@murilobr murilobr commented Jan 23, 2019

Fix getFileType function to extract file extension in a signed url.

refs #98

@shranet
Copy link

shranet commented Mar 3, 2020

Your change will return "gif" for "filename.jpg?a=1.2.gif".
I think the final code would be:

return this.file.name.split(/\#|\?/).shift().split('.').pop().toLowerCase();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants