PDA

View Full Version : CRSF - JavaScript Placement


Mickie D
06-02-2015, 07:26 AM
Hi there,

I need some help with the javascript placement for the security token...

this is the code

<script>
var r = new Resumable({
target:'downloads.php',
chunkSize:1*1024*1024,
simultaneousUploads:4,
testChunks:false,
throttleProgressCallbacks:1
});


I think this is the code i need to put in...


SESSIONURL + 'securitytoken=' + SECURITYTOKEN + '&foo=' + foo);


not 100% though...

thanks all.

Mick

--------------- Added 1433241894 at 1433241894 ---------------

I tried this


<script>
var r = new Resumable({
sessionurl:SESSIONURL,
target:'downloads.php',
chunkSize:1*1024*1024,
simultaneousUploads:4,
testChunks:false,
securitytoken:SECURITYTOKEN,
throttleProgressCallbacks:1
});


But this does not work, When I turn on CRSF at the top of the file - nothing uploads.

Dave
06-02-2015, 08:59 AM
Did you check the console/network tab in developers tools? It should show any errors and the parameters of the POST/GET request.

Mickie D
06-02-2015, 09:09 AM
Sorry Dave, where do I check that my friend.

And thank you very much for your help.

Mick

--------------- Added 1433243419 at 1433243419 ---------------

Is that in chrome?

kh99
06-02-2015, 09:49 AM
In the Chrome menu it's More Tools > Javascript Console, then the Network tab, then reload the page.

Mickie D
06-02-2015, 10:14 AM
this is all I get

This browser is AJAX compatible
vbulletin-core.js?v=422:11 Fire vB_XHTML_Ready
vbulletin-core.js?v=422:11 Fetch Cookie :: vbulletin_collapse = ''
vbulletin-core.js?v=422:11 Firing System Init

no errors?

Mick

Dave
06-02-2015, 10:59 AM
What if you check the network tab when it sends that request of your JavaScript example?