I have a python script that uploads images to Yandex Disk using the yadisk
module. The script looks like this:
def uploadYandexDisk(path, filename):
try:
y.upload(filename, path)
y.publish(path) # I don't know if this is necessary
return y.get_download_link(path)
except Exception as e:
print(e)
return None
When I open the link in my browser and even in incognito mode where I'm not logged in to Yandex, it works. And it also works when I directly put the link in the html without any javascript. But when I try to put the link in the src of an img using javascript I get a 403 not authorized error in the console. Is there a way to fix this or any workarounds?