Commit 1602f592 by Chris Dodge

use better API

parent fa8ae228
......@@ -411,12 +411,12 @@ function showFileSelectionMenu(e) {
}
function startUpload(e) {
file_input = $('.file-input').val().replace('C:\\fakepath\\', '');
if (file_input === '')
files = $('.file-input').get(0).files;
if (files.length === 0)
return;
$('.upload-modal h1').html(gettext('Uploading…'));
$('.upload-modal .file-name').html(file_input);
$('.upload-modal .file-name').html(files[0].name);
$('.upload-modal .file-chooser').ajaxSubmit({
beforeSend: resetUploadBar,
uploadProgress: showUploadFeedback,
......
Markdown is supported
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