Guilherme Marques
Guilherme Marques

Reputation: 59

Read files from client folder and upload to server - ASP.NET

What is the best way to get files from client folder (a folder that the client will choose the path) and upload to server?

Thanks.

Upvotes: 2

Views: 1180

Answers (1)

John Wu
John Wu

Reputation: 52230

You can't.

For privacy reasons, code from web sites running in a browser context is not allowed to enumerate files or directories on the client machine and send that information to a server. Imagine what would happen if it could!

You could possibly get around this limitation with some more complicated solution that includes a client side install (e.g. an ActiveX control) but this is simply not possible with ASP.NET alone.

Upvotes: 1

Related Questions