Kitware/VolView

Whether the absolute file path on the server can be loaded

Linst-inf opened this issue · 3 comments

Hello, loading data by combining url with domain name, for example: https://xxx.com?url= [/root/xxx/xxx/xxx.nii], this is an error. I would like to know if there is any way to load the files in the absolute path of the server. If not, please inform me the reason. Thank you!
image

您需要通过 Web 服务器提供 xxx.nii 文件,以便 Web 应用程序访问它。不能只为 Web 应用程序提供本地文件系统路径。
……
2024 年 4 月 17 日星期三下午 3:37 Linst-inf @.> 写道:您好,通过 url 和域名结合加载数据,例如: https://xxx.com ?url= [/root/xxx/xxx/xxx.nii],这是一个错误。我想知道是否有任何方法可以加载服​​务器的绝对路径中的文件。如果没有,请告诉我原因。谢谢你! image.png (在网络上查看) < https://github.com/Kitware/VolView/assets/111498582/c9396970-0024-4436-bae3-a36de4cd28b8 > — 直接回复此电子邮件,在 GitHub 上查看 < #580 > ,或取消订阅 < https://github.com/notifications/unsubscribe-auth/AEALHP54I337KE63C7QODI3Y54PW3AVCNFSM6AAAAABGMKYSM2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DSNJVGY3TONQ > 。您收到此消息是因为您订阅了该主题。消息 ID:@.>

Thanks for your answer, so it is not possible to load local files directly from the server through the url method, right? If you want to load the local one you have to select it or drag it?

Yes. If you run something like npx http-server -cors in the same directory as the .nii file, then you can use the url method.