Commit e93f4df3 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

irsteaFileUpload: transforme acceptFileTypes en Regex.

Showing with 5 additions and 0 deletions
+5 -0
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
delete options.uploadPrototype; delete options.uploadPrototype;
delete options.downloadPrototype; delete options.downloadPrototype;
if(options.acceptFileTypes) {
options.acceptFileTypes = new RegExp('^' + options.acceptFileTypes + '$');
console.debug(options.acceptFileTypes);
}
var formatSize = function(size) { var formatSize = function(size) {
if(size > 1000000000) { if(size > 1000000000) {
return (size/1000000000).toFixed(2) + ' Gio'; return (size/1000000000).toFixed(2) + ' Gio';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment