I am a asp.net developer. Users can upload their pictures in my application and view them later. When a user views his own pictures selects filter category as extensions, i want to filter them by extensions. I want to use javascript to filter .jpg, .png in a application folder..if user wants to view based on extensions. Is that possible ?
-
Its impossible. (in client and with javascript) – Aristos Oct 27 '12 at 10:01
1 Answers
You can read files on a server using ASP.Net. With a little effort (and file system permissions) you can create a simple file browser in a web page, and rename files using the System.IO
namespace. Again, this will read and modify files on the server.
JavaScript has extremely limited access to a user's machine (for good reason). It is not possible to modify files on a user's machine using JavaScript from a typical web page (it might be possible in some cases with browser extensions).
If you want to allow users of your ASP.Net website to modify files on their machine (i.e. the client), then you have a few choices:
Create an application that they can download and run on their own machine.
Use a browser plugin (Flash, Silverlight, ActiveX, Java). These all come with many caveats and they are poor choices in my opinion, but they can technically give you access to the file system.
-
1
-
@codebrain You can accept it as answer, and after some days that you get reputation to come and give +1. – Aristos Oct 27 '12 at 13:01