dropbox / dropbox/dropbox-sdk-python
Alternative to pending_upload when using sharing_create_shared_link_with_settings?
- Lingua principale
- Python
- Stelle
- 983
- Fork
- 330
- Merge medio
- 3m
- PR unite (30g)
- 10
Descrizione
The method [`sharing_create_shared_link` has a `pending_upload`](https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.sharing_create_shared_link) argument which you can use to ask Dropbox to generate a url for a file or folder which is still in the process of being uploaded. If you do this and then use the link before the file is fully uploaded, you see a nice "This file cannot be previewed" UI, showing a zero-byte file. Once the file upload is complete, you can use the URL to share as you would any other generated URL.
This is fine, but `sharing_create_shared_link` is [marked as deprecated](https://github.com/dropbox/dropbox-sdk-python/blob/487793dff3c5a8a3a76010799dc4803cabdb70f3/dropbox/base.py#LL4546C9-L4546C9) and has been replaced by `sharing_create_shared_link_with_settings`. The new method doesn't have the `pending_upload` argument, nor does there seem to be any setting which you can pass in to get the same behavior.
So my question is: how do I get a shared link from a pending upload using non-deprecated API? I am not doing any uploading myself, I just have a script which generates shared links. So I can't do a zero-length upload because it could clobber the in-progress one which I have no control over.
**Versions**
* What version of the SDK are you using? Python SDK 11.36.0
* What version of the language are you using? Python 3.9.6
* What platform are you using? macOS 12.6.6
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da dropbox/base.py, intorno alla definizione deprecata di sharing_create_shared_link, e confrontala con sharing_create_shared_link_with_settings. Controlla la superficie dell’API generata e qualsiasi test o documentazione correlati al comportamento di pending_upload. Il lavoro è completato quando viene identificato un percorso supportato e non deprecato, oppure viene documentato che il comportamento non è disponibile; l’issue non ha un obiettivo di test o implementazione specificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100