Downloading attachment question.

Hi.

I am trying to figure out how to download attachments? I have a test task with 2 images attached. I try to send a request to get URLs back and then download them via URLs like this:

But the response does not have URLs even though flag is set to true:



When we download by ID like this:


Do we have to 'dump' request content into a file after that ?

P.S. You have to add ability to add code snippets to this board.

Regards.
Juris.

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
1件のコメント

if you make a call like this

https://www.wrike.com/api/v4/attachments/<id>/url it will return to you the URL to access the attachment. 

so the best option would be to download it from the URL or pass the URL to whatever API you need (I am assuming here you want to copy the attachment to another storage location), if it has the ability to upload from URL. e.g. dropbox does and it this is what I tested with. if you want to download it as you are doing now then it will return the attachment content and you will need to save it somewhere before you can use it in the next step.  

Miron Mizrahi Community Team at Wrike Wrike Product Manager Wrike Discover で Wrike のエキスパートになろう

Miron Mizrahi Wrike Team member Wrike Discover で Wrike のエキスパートになろう

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: Downloading attachment question.
[this list is visible for admins and agents only]

トップ

今後のライブセッション

お探しのものが見つかりませんか? 新しい投稿を作成する