file upload and download with renaming
-
hi i want to save renamed uploaded files in my site for example i save a.gif as 123423.aspx, right is it possible to show this image in browser without renaming it again with reponse.write or other technique (for example loading image in memory)? thanks
-
hi i want to save renamed uploaded files in my site for example i save a.gif as 123423.aspx, right is it possible to show this image in browser without renaming it again with reponse.write or other technique (for example loading image in memory)? thanks
Hi, if you want to return gif image from aspx page you can use Response.WriteFile method (http://www.google.com/search?q=response+writefile[^] ). This method copies content of file (in this case gif image) to response stream. Because browser can't determinate what type of content you are sending you should also set Response.ContentType to "image/gif" (http://www.google.com/search?q=response+contenttype[^] ). But if you expect high load of your app this may not be best solution, because Response.WriteFile is slower than linking directly to image. Hth :)
Tomas Petricek (Microsoft C# MVP)
www.eeeksoft.net | Photos | ASP.NET Multi-column layout control -
hi i want to save renamed uploaded files in my site for example i save a.gif as 123423.aspx, right is it possible to show this image in browser without renaming it again with reponse.write or other technique (for example loading image in memory)? thanks
hi there, u can save the new name of the uploaded file in somewhere (e.g : DB) U therefore can retrive the new name and show this in browser without renaming just my thoughts << >>
-
hi there, u can save the new name of the uploaded file in somewhere (e.g : DB) U therefore can retrive the new name and show this in browser without renaming just my thoughts << >>
hi dear enjoycrack how can i do this ? plz tell me some detail thanks a lot
-
hi dear enjoycrack how can i do this ? plz tell me some detail thanks a lot
hi hassan, ok let start as the following steps: 1. u save and rename the uploaded file in somewhere 2. then save the path of the file into DB 3. when user requests the web page, u only read the path from DB... hope this helps << >>
-
hi hassan, ok let start as the following steps: 1. u save and rename the uploaded file in somewhere 2. then save the path of the file into DB 3. when user requests the web page, u only read the path from DB... hope this helps << >>
hi enjoycrack let i explain what i need my client upload a.gif file to my site i rename it as 12332323.aspx (for unauthorized download and view) and save file original info in DB.when other user request it for download i want to place this aspx file to download without renaming it again to a.gif for this what can i do ? thanks
-
hi enjoycrack let i explain what i need my client upload a.gif file to my site i rename it as 12332323.aspx (for unauthorized download and view) and save file original info in DB.when other user request it for download i want to place this aspx file to download without renaming it again to a.gif for this what can i do ? thanks
hi sorry for my misunderstood. :-) To implement wat u need: anyway u must read the file a.gif from DB and then write byte stream to client, I think << >>