I have the requirement to allow a user to provide a local directory path via a UI in a web application so that we can save it to our database. Our other program (a winforms app) will then use this path to store files (actually recordings) that they have created via the app.
Ideally I would like to remove as much room for human error as possible i.e. only let them use paths that exist so would prefer to have some kind of select directory dialog that forces them to use existing directories however I have read that this is not possible on client side code for security reasons which of course makes total sense but is there some way that this can be achieved? So far I have been unable to find anything of use besides just letting them type it in and I am not happy with the lack of control over the path they enter.
Sometimes, more choices simply don’t make things easier for your Customer.
The “standard” for Windows App’s is storing things in the user’s Documents directory, and then possibly an App specific folder within the user’s Documents directory.
I would just go with the default expectation, the User’s Documents directory.
When you are thinking about this, ask yourself what the code should do if the directory the user selected disappears, for whatever reason. This could happen because the user changes computers between when they setup this thing using your WebUI and when they user the WinForm’s client.
Going with the standard behavior, Documents folder and perhaps then a subdirectory named after the App, obviates all of these problems.
Hope this helps.