Skip to content

Commit

Permalink
Accept any uploaded file format if no accepted formats specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Shunko authored and hubzero-admin committed May 19, 2020
1 parent 5d67fd7 commit 6697254
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/plugins/projects/files/assets/js/fileupload.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ HUB.ProjectFilesFileUpload = {

_formatIsAccepted: function(file)
{
HUB.ProjectFilesFileUpload.acceptedFormats = HUB.ProjectFilesFileUpload.acceptedFormats || {};
if(typeof HUB.ProjectFilesFileUpload.acceptedFormats === 'undefined') {
// accept file if there is no acceptedFormats lookup
return true;
}
var match = file.name.match(/\.(.*$)/);
var format = match ? match[1] : '';
format = format.toLowerCase();
Expand Down

0 comments on commit 6697254

Please sign in to comment.