Client-side custom script from file

Hello all

I’d like to load a custom script from a file rather than maintaining it in the custom script dialog’s text area.

I tried the following but I do not succeed, no matter how I change the URL! Form absolute to relative path, from localhost to IP, nothing seems to work.


Note in the above screenshot that I’ve uploaded the file as an attachment and made it public, so it should be accessible.

Maybe frappe.require is not the correct method to call in order to load the file? Please help.

start from file my be its work like this /files/Hygiene_and_Sanitation_Material.csv