我使用jQuery插件uploadify上传文件以获得每个上传的文件的唯一名称。所有文件都上传到同一个目录。当我尝试上传文件两次时,它会给我以下错误。如何使用uploadify
filename.gif (4.3KB) - IO Error
我想每次都上传一个具有唯一名称的文件。有许多其他用户在同一目录中上传文件。所以有可能两个用户共享相同的文件名。我怎样才能避免覆盖。
我的代码:
$('.SingleFileUpload').uploadify({
'uploader' : '/uploadify/uploadify.swf',
'script' : '/uploadify/uploadify.php',
'cancelImg' : '/uploadify/cancel.png',
'folder' : '/uploads',
'auto' : true,
'queueID' : 'fileQueue',
'removeCompleted':false,
'onComplete' : function(event, ID, fileObj, response, data) {
$(event.target).closest('form').append('<input type="hidden" name="uploaded_file" value="' + response + '">');
}
});
确定。 'php'标签被添加。因此,我们可以解决它** ** uploadify.php我 – Student