APP development - Access file server from httpHandler
Hello,
I recently started to look into Youtrack as Jira replacement and am exploring APP development (which I will need to use heavily to be able to migrate to Youtrack).
I have not found the way how to store and read files in/from file system.
Is there a way how to do that from httpHandler?
Thanks in asvance!
Please sign in to leave a comment.
Hello Sandra!
Thank you for your interest in YouTrack. I'll be glad to help!
It's not possible to access a file system directly from an app. Apps run in a sandbox for security and stability. This means that the frontend sandbox is not allowed to access client-side browser APIs, so apps are unable to access the
localStorage,sessionStorage, web cookies, etc. The backend also operates as a sandbox via the GraalVM and can run workflow rules and HTTP handlers, but not connect directly to an outside file system.Please find the detailed description of the apps architecture at https://www.jetbrains.com/help/youtrack/devportal/app-architecture.html
You can create a custom endpoint via the http handlers and trigger code execution on the backend by calling the endpoint. The ability to run JS code on the backend allows to use our http module to establish connection and retrieve data from your server. Our engineers strongly suggest setting up authorization and following all security best practices in such cases, as you expose your data.
Importantly, I would like to highlight that we have ready-to-use import scripts, including the one for Jira, so you do not need to develop an app from scratch to import the data from Jira to YouTrack. You can edit the import script right from the UI in case you would like to adjust it to your needs.
Please don't hesitate to reach out to Support anytime if you have any questions or need any assistance, we're always glad to help.
Have a nice day!