Is it possible to read an attached file from a javascript?
Accepted answer
This should be used to configure the scripts, as it is the built in fastest method to do so.
Since JavaScript is run on the Client as well as on the server, you would need to use some mechanism based on html to access external data. It would likely have to be published by some Web Server similar to how the http filtered value provider uses such data.
Doing excessive customization using JavaScript, especially with accessing remote data, can crate performance issues and ruin it for the users.
Comments
The problem is that this configuration is too big to being included in process configuration (it is like a catalog) and we don't have external web server to publish it. I was supposing that having process attachments they could be accessed in some way, like a public url (as, I imagine, the icons)
The icons are packaged in the Java Bundles.
I don't believe you can access a file, especially as you would need do be able to do that from the client as well as the server. I might be wrong, but it would likely a huge security breach, if you could.
Should I add that, if the file is that big, it is probably a bad idea to try to load it every time the script is run?
1 vote
Yes, you're definitely right. The best thing would be to create a provider service as you suggest but unfortunately we cannot do it. We'll resolve reading the file with a server side advisor, which is not what the user wants but it will be sufficient.
Thanks,
Michele.