I have a script where I want the end user to be able to specify an image (using a file chooser) to change the site's background to. But I don't want them to actually upload the file to the server, as that would not only be redundant (as they would then just be re-downloading it when the background changes) but also impossible since it's a user script. Rather, I just want the background src to change to the local file path.
How is this best accomplished? The file chooser form element for some reason only gives javascript access to the filename and not the full path. I'm okay with using a different HTML element as long as the users don't have to type in the file path manually.