Collectives on Stack Overflow. Learn more. Asked 10 years, 9 months ago. Active 2 months ago. Viewed k times. FileInfo filePath ; Response. AddHeader "Content-Disposition", String. AddHeader "Content-Length", fileInfo. ToString ; Response. WriteFile filePath ; Response. End ;. Improve this question. Can you elaborate a bit on what you mean with "virtually mapped"? The system then creates this reference to the directory at runtime. You can browse to the files via the web URL without issue — mp3duck.
The filename is indeed accessibile via URL. If you know the URL and the file extension opens the save as prompt in the browser or is this one of your problems? Otherwise, user's suggestion seems to be the way to go.
Add a comment. Active Oldest Votes. GetResponse ; if fileReq. AddHeader "Content-Length", fileResp. Think about it: if you could do that for an image, malicious sites could do that for all your files without you even noticing.
Is that what you want to happen to your system? Posted Dec pm OriginalGriff. Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account. This email is in use. Do you need your password? Submit your solution!
When answering a question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. Thanks all. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Scott Ivey Scott Ivey You can use webclient or httpwebrequest. Webclient is probably easier for what you want to do.
DownloadFile downloadURL. Text, savePath. Text ;. Bruce Adams Bruce Adams Cprotectedvoid btn. UploadClickobject sender, Event. Upload control. Stream fs File. Stream Binary. Reader br new. Readerfs byte bytes br. Length Save the Byte Array as File. Path Files Path.
How to create a pdf file in C PDF Portable Document Format is a file format that has replicate all the characteristics of a printed document that you can read.
Name File. Path, bytes Display the Image File. Url file.
0コメント