I'm making a web app using ASP.NET MVC 4.
It lets people upload files.
I want to list all the files from a user with a link to open/download each file.
I have the virtual path to each file (e.g. :~/Folder/file.txt), how can I generate the link with razor?
I tried with @Href but it doesn't render anything, same thing with @Url.Content.
I tried also without using razor but I don't think it's a good way...
Your help would be welcome! Thanks!
-
you are saving files in a folder???Kartikeya Khosla– Kartikeya Khosla2014-08-13 09:16:30 +00:00Commented Aug 13, 2014 at 9:16
-
@Exception, where do you usually save yours? :)Andrei V– Andrei V2014-08-13 09:17:14 +00:00Commented Aug 13, 2014 at 9:17
-
@AndreiV...database....Kartikeya Khosla– Kartikeya Khosla2014-08-13 09:17:34 +00:00Commented Aug 13, 2014 at 9:17
-
Are you referencing the file hardcoded in your project?LockTar– LockTar2014-08-13 09:18:02 +00:00Commented Aug 13, 2014 at 9:18
-
2@Exception, You save files to a database!?!?! Well that's expensive... Why not something like Azure Storage? Of just a directory?LockTar– LockTar2014-08-13 09:19:18 +00:00Commented Aug 13, 2014 at 9:19
|
Show 13 more comments