Reputation: 317
I'm trying to implement jQuery File Upload on a classic ASP VBScript page and I think I may be out of my league. ( i know i am)
This is the component I am trying to implement:
http://blueimp.github.io/jQuery-File-Upload/basic-plus.html
I think I've figured out how most of it works, except how to implement it to my server. I don't know what code to put into the first few lines of code where it says var url. They seem to list the host name twice and there are two other location variables after that that I'm not sure how to apply. Let's say my VbSCript page that accepts this form upload is located at: www.mysite.com/thisfolder/upload.asp How would I plug this URL into these variables?
$(function () {
'use strict';
// Change this to the location of your server-side upload handler:
var url = (window.location.hostname === 'blueimp.github.io' ||
window.location.hostname === 'blueimp.github.io') ?
'//jquery-file-upload.appspot.com/' : 'server/php/',
uploadButton = $('<button/>')
.addClass('btn')
.prop('disabled', true)
.text('Processing...')
.on('click', function () {
var $this = $(this),
data = $this.data();
$this
.off('click')
.text('Abort')
.on('click', function () {
$this.remove();
data.abort();
});
data.submit().always(function () {
$this.remove();
});
});
Upvotes: 1
Views: 2905
Reputation: 11
You can also hard code with the actual directory structure and point directly to the location of your upload handler (note the forward slash after the ').
var url = window.location.hostname === '/var/www/cgi-bin/UploadHandler.php' ?
The above works for me. Running CentOS 6.9
Upvotes: 0
Reputation: 6818
That var url=
... stuff is just for the demo site. You can simply replace it like so:
var url = 'http://www.mysite.com/thisfolder/upload.asp',
Upvotes: 1