如何删除和下载附件? [英] How to delete and download attachments?

查看:98
本文介绍了如何删除和下载附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有人,


过去几天我一直想弄清楚如何删除附件并将附件下载到我的电脑上。删除是有点工作,我不知道从哪里开始下载。现在删除它将从服务器上的附件文件夹中删除,但它不会从数据库中删除,想知道是否有人可以解释我在删除附件时做错了什么以及如何使用户可以下载的地方附在那里的电脑?这就是我所拥有的。

<跨度类= codeLink 的onclick =模糊(此,this.parentNode.parentNode,的getChildren (this),true);>展开 | 选择 < span class =codeDivider> | Wrap | 行号

解决方案

我们将一次处理一件事。先删除。哪里是删除查询?



我们将一次处理一件事。先删除。哪里是删除查询?



Hey Acoder,


我有一个删除查询但是我把它拿出来因为它一直在删除我的文件。如果我去查看它,它会在第一次正常工作,但如果我刷新它删除它。或者,如果我再次查看该文件,它将被删除。但这是我所拥有的

展开 <跨度类= codeDivider > | <跨度类= codeLink的onclick = 全选(在此); >选择 | Wrap | 行号


删除查询应该在实际的删除操作旁边( cffile)。


当你说下载时,你的意思是下载到用户的电脑? cffile action =" copy"不会这样做您需要设置内容处置标题。


Hey Everyone,

Well for the last few days i been trying to figure out how to delete attachments and download attachments to my computer. The deleting is sort of working and i don''t know where to begin on downloading. Right now with the deleting it will delete from the attachments folder on the server but it does not delete from the database an was wondering if someone could explain what i am doing wrong on deleting attachments and how i could make it where a user could download an attachment to there computer? Here is what i have.

Expand|Select|Wrap|Line Numbers

解决方案

We''ll deal with one thing at a time. Deleting first. Where''s the delete query?


We''ll deal with one thing at a time. Deleting first. Where''s the delete query?

Hey Acoder,

Well i had a delete query but i took it out because it kept deleting my files. If i went to view it, it would work right the first time but if i refreshed it deleted it. Or else if i went to view the file again it would be deleted. But here is what i did have

Expand|Select|Wrap|Line Numbers


The delete query should go next to the actual delete operation (cffile).

When you say download, you mean a download to the user''s computer? cffile action="copy" wouldn''t do this. You need to set a content-disposition header.


这篇关于如何删除和下载附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆