drwjv28028 2014-10-23 07:41
浏览 56

blueimg jquery文件上传 - 无法从服务器删除上传的图像

I am using blueimg jquery file upload Basic Plus UI version and it uploads image to server fine.

http://blueimp.github.io/jQuery-File-Upload/

Howver, then I click delete button to delete uploaded image(s), the image get deleted on screen, BUT not deleted from server directory where the images are.

When I refresh the screen all the uploaded images (regardless deleted or not) re-appear on the screen.

Could anyone tell me: 1. How to actually delete the images from server? (not just from web screen) 2. When I refresh the screen, do not show any loaded images, just clear the screen (re start upload process)

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • doukefu1361 2014-10-23 10:21
    关注

    Assuming you're using the UploadHandler.php class...

    By default the method for deleting files is DELETE, but not all servers support this. You can change it to POST by setting the $options parameter of the class constructor.

    $foo = new UploadHandler(array('delete_type' => 'POST'));
    

    See line 52 of UploadHandler.php

    //Set the following option to 'POST', if your server does not support
    //DELETE requests. This is a parameter sent to the client:
    'delete_type' => 'DELETE',
    
    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?