Write file without user input

I created an app that requires loading images and tie to part numbers, I have done so in SQL where the image is read and stored through system.file.readFileAsBytes(path), however I think its a better idea to save the images in a network drive and refrence the file location instead.
system.file.writeFile(bytes, data) prompts the user for a location to save the file, is there a way to hard code the location where the file will be saved?

Jado58

take a look here https://docs.inductiveautomation.com:8443/display/DOC/system.file.writeFile

Just place the file name as the first parameter

system.file.writeFile(filepath, bytes)

Anyone with a way to go about this

https://docs.inductiveautomation.com/display/DOC80/system.file.writeFile

Same solution, updated link. You can present the file name/path to this and it will write it without a user prompt.

I think the OP was confusing system.file.writeFile() and system.file.saveFile(). The latter prompts.

1 Like