mvlnetdev / photoprism_client

A Python client to interact with photoprism.
MIT License
18 stars 12 forks source link

HTTP 403 with endpoint /dl/:hash #8

Open angus-mcmahon opened 1 year ago

angus-mcmahon commented 1 year ago

Hi!

Thanks for the work on this :)

In photoprism/internal/api/download_file.go#L45 requests to download_file need to include a downloadToken, otherwise a status_code: 403 will be returned.

The error will be raised as a KeyError relating to Content-Disposition, but this is actually due to the unhandled 403.

mvlnetdev commented 1 year ago

Thanks! I merged your PR#9. I'll leave the issue open until it is packaged and a new version is added to PIP.

We also need to add a test or example for this.