epam / miew

3D Molecular Viewer
https://miew.app
MIT License
134 stars 42 forks source link

Cannot load pdb from URL #393

Closed rocfo closed 2 years ago

rocfo commented 2 years ago

The viewer cannot open a pdb file from a URL. I am using a URL that points directly to a file hosted on Zenodo: https://zenodo.org/record/3857791/files/4ptv_apo.c0.pdb?download=1 If I download the file, then upload it to miew.app from my computer, it works as expected.

Steps to reproduce the behavior:

  1. Go to miew.app
  2. Click on Menu, Load
  3. Paste the link https://zenodo.org/record/3857791/files/4ptv_apo.c0.pdb?download=1
  4. Click on Load

Expected behavior Load and display the pdb structure file.

Screenshots Screenshot_20220209_133346

Desktop:

Additional context The final goal is to obtain a URL to a specific visualization using Miew, with the structure file publicly accessible, so that the user does not need to download and upload the file. That would be fantastic!

AnaMoskvina commented 2 years ago

Dear @rocfo,

Thank you for your interest in Miew.

The issue you faced is caused by the CORS policy of the resource you are using (you can see the corresponding message in a browser's console): the server doesn't allow other domains to access data, and we cannot impact such behavior.

Feel free to contact us, if you have any questions, we will be happy to help.

Best regards, Miew team

rocfo commented 2 years ago

Dear @AnaMoskvina , thanks for looking into this. Good to know it's not a bug. Do you know of any public data repository that allows other domains to access data? Best, Rocco

AnaMoskvina commented 2 years ago

Dear @rocfo,

You can check out these resources:

Best regards, Anastasiia

paulsmirnov commented 2 years ago

I hope the question was successfully resolved. Closing.