I'm creating asp.net special file manager. all file information saved to SQL Server table. My table is here
Table tFile(
FileID uniqueidentifier,
FileName nvarchar(50),
Extension nvarchar(50))
Upload process is: First i'm insert table row and then upload file to server. Then file renamed to FileID (GUID value). For example : 4a6327c4-0596-4949-a5f2-a639e934d534.JPG
Inserted table row is like this
4a6327c4-0596-4949-a5f2-a639e934d534 | image1 | JPG
And file on the server like this
www.domain.com/aa/Files/4a6327c4-0596-4949-a5f2-a639e934d534.JPG
My problem is when i downloading current file, 4a6327c4-0596-4949-a5f2-a639e934d534.JPG
named file was downloaded. I need image1.JPG
When any user downloading current file, how to generate current file name to normal filename like 'image1.jpg'