Hi Folks,
Is there a way I can combine these two functions?
The first is to fix for the file input using railo, and the second is a post to an upload page:
$('#fileInput').change(function () {
$('#filenames').empty().append(_(this.files).map(function (f) {
return $('<input type="hidden" name="filenames[]"/>').val(f.name).get(0);
}));
});
/*jslint unparam: true */
/*global window, $ */
$(function () {
'use strict';
// Change this to the location of your server-side upload handler:
var url = window.location.hostname === 'https://www.textsomeone.com/report_incident3/upload.cfm';
$('#fileupload').fileupload({
url: url,
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
$('<p/>').text(file.name).appendTo('#files');
});
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
}).prop('disabled', !$.support.fileInput)
.parent().addClass($.support.fileInput ? undefined : 'disabled');
});