最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - get file names from uploadify jquery plugin - Stack Overflow

programmeradmin2浏览0评论

that is my first post

I am trying here, to get the names of the files that are uploaded, so that the user can delete it if desired, the same way as yahoo.

$("#uploadifysub1").uploadify({ 'uploader' : 'JS/uploadify.swf', 'script' : 'JS/uploadify.php', 'cancelImg' : 'cancel.png', 'buttonImg' : 'attach.png', 'folder' : 'uploads', 'queueID' : 'divquickuploadProgress1', 'auto' : true, 'multi' : true });

the problem is that I cannot get files names, any suggestions?

is there any function in uploadify, that can remove an uploaded file, or I have to do that myself??

Thanks in advance.

that is my first post

I am trying here, to get the names of the files that are uploaded, so that the user can delete it if desired, the same way as yahoo.

$("#uploadifysub1").uploadify({ 'uploader' : 'JS/uploadify.swf', 'script' : 'JS/uploadify.php', 'cancelImg' : 'cancel.png', 'buttonImg' : 'attach.png', 'folder' : 'uploads', 'queueID' : 'divquickuploadProgress1', 'auto' : true, 'multi' : true });

the problem is that I cannot get files names, any suggestions?

is there any function in uploadify, that can remove an uploaded file, or I have to do that myself??

Thanks in advance.

Share Improve this question edited Aug 11, 2010 at 11:45 omar asked Aug 9, 2010 at 13:10 omaromar 4466 silver badges19 bronze badges 2
  • You mean before they are actually uploaded? Remove them from the upload queue, right? – Pekka Commented Aug 9, 2010 at 13:12
  • no after they actually uploaded, there are option in uplodify, I think (closeimage) or some thing like that, that enables me to delete them while uploading – omar Commented Aug 9, 2010 at 15:03
Add a ment  | 

3 Answers 3

Reset to default 3

thanks to "Codler", I could solve this problem, I will share the code, maybe it will help.

$("#uploadifysub1").uploadify({
        'uploader'       : 'JS/uploadify.swf',
        'script'         : 'JS/uploadify.php',
        'cancelImg'      : 'cancel.png',
        'buttonImg'      : 'attach.png',
        'folder'         : 'uploads',
        'queueID'        : 'divquickuploadProgress1',
        'auto'           : true,
        'multi'          : true,
        'onComplete'     : function(event, queueID, fileObj, reposnse, data) {
            // write your own implementation
                           }
    });

my implementation was like that

var cod = '<tr>';
cod += '<td align="left">'+fileObj.name+'</td>';
cod += '<td align="left">';
cod += '<span onclick="removeprev(this,'+fileObj.name+')" style="cursor: pointer;">&nbsp;';
cod += '[remove]</span>';
cod += '</td>';
cod += '</tr>';
$('#uploaded_files').append(cod);

Thanks again

Quote from uploadify

fileDataName

The name of your files array in the upload server script. Default = ‘Filedata’

PHP code

$_FILES['Filedata']['tmp_name'];

why didn't you just set the removeCompleted option to false. It queues all the uploaded files.

发布评论

评论列表(0)

  1. 暂无评论