Thanks for the question, Dick.
Asked: January 15, 2020 - 8:08 am UTC
Last updated: January 17, 2020 - 1:52 am UTC
Version: APEX 18
Viewed 1000+ times
You Asked
When uploading a file into the database with the File browse page item a File dialog appears.
Question: how can I define in with directory the File dialog opens like you can in Java:
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
Use case: our customer wants to upload documents from a case folder.
and Connor said...
No you can't because it is not under the control of the browser.
btw, I think that is a good thing - I don't think we should override the user - if they've done 100 uploads from (say) C:\TEMP, they would be pretty frustrated when every time that used APEX it toggled them back to (say) C:\HOME.
You could probably hunt for browser extensions to allow it, but it is not an APEX thing natively.
(Thanks to friend Jeff Kemp for confirmation)
Is this answer out of date? If it is, please let us know via a Comment