admin管理员组文章数量:1405871
I am using "plupload" to upload files then redirect to an acknowledgement page. What I would like to do is add the filename to the url string
EG(www.mysite/thanks.php?file=file.jpg)
For someone at my level the documentation for plupload es across as somewhat sparse and I have been unable to identify which variable/object carries the file name.
Here's where I would like to put the code
Uploader.bind('FileUploaded', function(Up, File, Response) {
if( (Uploader.total.uploaded + 1) == Uploader.files.length) {
// var myfilename = !!!!!!!!!!!!!
window.location = 'uploaded.php?file=!!!!!!!!!';
};
})
I would really appreciate some assistance with this, frankly it's driving me to distraction!
I am using "plupload" to upload files then redirect to an acknowledgement page. What I would like to do is add the filename to the url string
EG(www.mysite/thanks.php?file=file.jpg)
For someone at my level the documentation for plupload es across as somewhat sparse and I have been unable to identify which variable/object carries the file name.
Here's where I would like to put the code
Uploader.bind('FileUploaded', function(Up, File, Response) {
if( (Uploader.total.uploaded + 1) == Uploader.files.length) {
// var myfilename = !!!!!!!!!!!!!
window.location = 'uploaded.php?file=!!!!!!!!!';
};
})
I would really appreciate some assistance with this, frankly it's driving me to distraction!
Share asked Aug 5, 2011 at 12:19 Username_nullUsername_null 1,3472 gold badges21 silver badges30 bronze badges2 Answers
Reset to default 5This should do the trick:
Uploader.bind('FileUploaded', function(Up, File, Response) {
if( (Uploader.total.uploaded + 1) == Uploader.files.length) {
window.location = 'uploaded.php?file=' + encodeURIComponent(File.name);
};
})
You can also check the documentation for additional options : http://www.plupload./plupload/docs/api/index.html#class_plupload.File.html
I am not much sure about PHP but plupload use file as form variable for file you are trying to upload. If you just want to pass file name in url try different name may be filename instead of file.
本文标签: phpHow to get a Plupload filenameStack Overflow
版权声明:本文标题:php - How to get a Plupload filename? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744916993a2632056.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论