文件下载名称应与注册用户名相同 [英] File download name should be same to the register user name

查看:76
本文介绍了文件下载名称应与注册用户名相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


有一些文件,但只有注册用户可以下载.下载文件时,其名称应与登录时的当前用户名相同.


谢谢

Hi all,


There are some files,but only the register user can be able to download it.While downloading the file,its name should be same to the current user name who had logged in.How to achieve this.


Thanks

推荐答案



一种选择是创建一个ashx处理程序.致电
yourhandler.ashx?id = filename然后将从其位置(无论在何处
)获取文件 即)并将其写入响应流.那也是你会给的地方
文件的新名称.

对处理程序本身的访问只能限于注册用户.
Hi,

one option would be to create an ashx handler. A call to
yourhandler.ashx?id=filename would then grab the file from its location (wherever
that is) and write it to the response stream. That''s also where you would give
the file its new name.

Access to the handler itself could be restricted to registered users only.


这篇关于文件下载名称应与注册用户名相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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