tus / tus-py-client

A Python client for the tus resumable upload protocol
https://tus.io/
MIT License
167 stars 45 forks source link

get_url missing in uploader ? #95

Open salimkanoun opened 3 months ago

salimkanoun commented 3 months ago

Hi there in the uploader class it mention a get_url method to retrieve the uploaded file url `get_url() Return the tus upload url.

If resumability is enabled, this would try to get the url from storage if available, otherwise it would request a new upload url from the tus server.`

But seems to be missing in the code, is it normal ?

The internal property uploader.url is accessible an contains the url, but probably better to access it through a getter

Acconut commented 3 months ago

I don't see a mention of a get_url in the code base. Could you send a link to the corresponding code section?

salimkanoun commented 3 months ago

it is in the documentation : https://tus-py-client.readthedocs.io/en/latest/tusclient.html#tusclient.uploader.Uploader.get_url

Acconut commented 3 months ago

Ah, ok, I see. Thanks for noticing this. This documentation hasn't been updated in some time and is no longer in sync with the source code. We need to update this.

As far as I can tell, the get_url method was removed in 2020, although I don't know why: https://github.com/tus/tus-py-client/commit/2548bbf1552efa5d629616931e9320b1f8e9793b#diff-97989457ef05ef7429f22c43163bf6cc86bb7ae0b44379de7a06c8b35fcd8aaaL202

It's probably best and safe to directly access the url property for now.