Skip to content
Commit 313b824d authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez
Browse files

Replace fileName variable with data.files[0].name



There is no need to store the file name, as the "data" parameter given to
all the callbacks provides a "files" attribute with all the files that
the callback refers to; moreover, it will always be a single file due to
the use of "singleFileUploads" in the jQuery File Upload plugin.

This also fixes the loading icon not disappearing when several files were
uploaded at once. "singleFileUploads" causes the "add" callback to be
called once for each file to be uploaded, so "fileName" was overwritten
with the name of each new file in the upload set; when "fileName" was
later used in the "done" callback to find the file in the list whose
loading icon replace with the MIME type icon "fileName" always had the
name of the last file, and thus its icon was the only one replaced.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent c70688e5
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