Ciao,
purtroppo non sono pratico di asp e mi chiedo se posso rinominare il file che voglio scaricare dal mio server.
uso questo codice qua:
Il files su server si chiama PIPPO.JPG [nome_file_su_server] tuttavia voglio rinominarlo in PLUTO.DOC [nome_file_per_dowload] senza rinominare fisicamente il file su server ... potete aiutarmi?codice:Dim download, filescar nome_file_su_server = Request.QueryString("file_server") nome_file_per_dowload = Request.QueryString("file_download") direct = Request.QueryString("direct") Set download = Server.CreateObject("ADODB.Stream") download.Type = 1 download.Open download.LoadFromFile Server.MapPath (direct & nome_file_per_dowload) Response.AddHeader "Content-Disposition", "attachment; filename=" & nome_file_per_dowload Response.ContentType = "application/octet-stream" Response.BinaryWrite download.read Response.Write("risp=ok") download.Close Set download = Nothing
grazie
mirko

Rispondi quotando

