Feature #1470
closedmod_uploadprogress: js-prefix, js-suffix parameters [patch]
Description
mod_uploadprogress needs two more parameters: js-prefix and js-suffix.
js-prefix contains text to be prepended to J-SON output, and js-suffix -- to be appended to the J-SON output.
Motivation: to upload files to the host other then host from which HTML page was loaded.
Say, we have page http://server-a/page.html. And we want to upload files to the http://server-b/upload.cgi
XMLHttpRequest does not allow requests to other hosts, so we cannot ask server-b for upload progress using XMLHttpRequest.
However, any external script can be executed from server-b by creating tag "script" using DHTML.
So if http://server-b/uploader.cgi?X-Progress-ID=abcdabcdabcdabcdabcdabcdabcdabcd contained something like
passUploadProgress(<json-data>)
for example
passUploadProgress(new Object({ 'state' : 'starting' }))
we can fetch upload progress.
(passUploadProgress function can be defined somewhere in page.html)
So we need of configuration options:
upload-progress.js-prefix = "passUploadProgress(" upload-progress.js-suffix = ")"
Files
Updated by stbuehler about 16 years ago
- Category changed from core to mod_uploadprogress
Updated by gstrauss over 8 years ago
- Description updated (diff)
- Assignee deleted (
jan) - Missing in 1.5.x set to Yes
Also available in: Atom