Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : Setting file names on saving. Signup · Login
Author Thread
Setting file names on saving.
Posted in tutorial: Uploading Files into an Access Database using plain ASP
·  srw
User
Joined: 31 Jan 2005
Total Posts: 1
Setting file names on saving.
Posted: 31 Jan 2005
Excellent tutorial - thanks.

I guess it is dating fast with the growing number of components to do this sort of thing, but I was just looking for something that did this, without needing .NET or SQL Server or ActiveX, or a thousand and one other requirements or ActiveX plugins.

I added a couple of lines to file.asp before the content type declaration to get sensible file name handling. Seems to work in IE6 and Firefox1, but is based on "google hearsay", not RFCs.

Disposition = "inline;filename=""" & rs("File Name") & """"
Response.AddHeader "Content-Disposition",Disposition
Response.ContentType = rs("Content type")

Oh and add "File Name" to the SQL retrieval earlier in files.asp

Now all I need do is integrate our authentication, supply a delete, refactor, the code, and I'll be set.

Users Who Have Visited This Thread In Last 24 Hours
6 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.