Open duanemoody opened 3 years ago
Yes, but how would we separate filename from tags if it has spaces as well?
Two choices:
myArray = [rating,tags]
using formData.append('myArray',myArray[])
Not quite sure what you mean by (2), doesn't the problem lie in file naming, it would be too late to fix it at the uploading stage? It's either stating clearly in the Readme that the files shouldn't have spaces in their name part, or using a special character or multiple spaces to delimit tags from the actual name.
I would opt for an easier solution, since I'm no longer actively developing this project and the last thing I want to do is to break something.
If you've checkmarked Set Title of each image to its original filename,
this is a picture.gif
becomespicture.gif
in the title field. I suspect this regex inuploader.js
is to blame:tags = fileName;
title = upOptions.title ? tags.split(/\s+/)[tags.split(/\s+/).length - 1] : '';
It's assuming "last space is delimiter to filename inside fileName" which only works if the filename has no spaces in it. If I've read the source correctly,fileName
is actually "[rating] [tags] [filename]" where an array would be safer to parse:fileInfo['rating']
,fileInfo['tags']
,fileInfo['filename']