Hello there,
I have a JavaScript file located on my Seafile server that I want to include as a script in a web app.
I’m using a link activated in Seahub.
However, my browser is not accepting it mentioning that it has the wrong MIME type (‘application/octet-stream’).
So is there anything that you can configure such that it sends the right MIME type?
(By the way, it’s working for other file types like .PNG)
It works as designed. For security it should not be possible to execute JavaScript shared by users.
1 Like
There’s way to link it over webdav. But you have to create something like public user. Share library with him and read-only access (in these step be carefull). There is HTTP Basic authentication for access webdav so you have to add credentials into link (this is why you have to be carefull what you are sharing with your public user and how much permissions you give him).
<link rel="stylesheet" href="https://public_user:password@seafile.example.cz/seafdav/Styles/main.js" />
For clear this. I’m not recommending this way to you, just providing solution.
Thanks for info, didn’t notice that.