Downloading with Python Client / Téléchargement avec le client Python (Document)

Hi, i'm working on an app who's using the Nuxeo Python API, i've done everything needed appart the download part, i can't find the way to download a document from it's uid using the Nuxeo Python API, When i try with URL, it sends me a 401 error so i tryed to found another way with “request” but it result in nothing, can somebody help me pls ?

Bonjour, je travaille sur une application utilisant l'api Python de Nuxeo, j'ai pu réaliser toutes les fonctionnalités sauf celle de téléchargement, j'aimerais télécharger un doc depuis son UID en utilisant l'api Python. J'ai déjà essayé en passant par l'url mais cela n'a pas marché (error 401), j'ai essayé avec “request” mais je n'ai également pas su résoudre le problème.

(Nuxeo 10.10)

Merci d'avance Thanks,

Hugo

0 votes

1 answers

889 views

ANSWER



Hello,

There is the document.fetch_blob() method that is used for that. If you can show your code, I could give a more accurate answer.

Regards,

NB: (re)writing a good documentation for the Python SDK is in the pipe and would help finding such snippet (see NXDOC-1543).

1 votes



Thanks a lot ! I've tried with a .png and it works well ! Yes the documentation is not really explicit but for example the upload doc is very nice

Thanks,

Hugo

01/22/2021