Reputation: 11
Can a web application access a file on client side?
Here's my scenario, I have a web service, which when called, stores the files in my content management server. Currently, I am storing the file in the server where my application is hosted and then reading the file content as my web service accepts file content in bytes, and then calling the service to host the file. long story short, if a 2mb file takes 2 minutes to be stored on the server, it is taking 4 minutes now. Can I access the file from client's machine directly rather storing it in the server and then reading it?
I have gone through some previous posts: HTML5 File Object - not supported in ie6 which is mandatory for me If a javascript function is used to read the file content, I still have to post back to the server to call the service Is Windows Script Host the answer for this, cause I have gone through some references, it doesnt seem so.
Upvotes: 0
Views: 404
Reputation: 499002
A web application can't access the client file system for security reasons.
Otherwise, every time you surfed the web you would expose your file system to the whole world.
If you can post the file directly to the web service (that is, the web service is accessible to the browser), that would cut the CMS out and reduce the time taken to save files.
Upvotes: 2