简体   繁体   中英

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.

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 (eg an ActiveX control) but this is simply not possible with ASP.NET alone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM