Replaced spaces with underscore in filename (#3386)

This commit is contained in:
Ayush Shukla 2017-05-29 17:11:28 +05:30 committed by Faris Ansari
parent 6dcfd8fdb3
commit 3b88792815

View file

@ -264,7 +264,7 @@ frappe.upload = {
var freader = new FileReader();
freader.onload = function() {
args.filename = fileobj.name;
args.filename = fileobj.name.split(' ').join('_');
if(opts.options && opts.options.toLowerCase()=="image") {
if(!frappe.utils.is_image_file(args.filename)) {
msgprint(__("Only image extensions (.gif, .jpg, .jpeg, .tiff, .png, .svg) allowed"));