Attachments uploaded via API - download_url & permanent_url not working

I am finding that after uploading images via the API, the permanent_url & download_url do not render.

Additional context, I am using the upload to take any .heic attachments, convert to .png, upload via API & delete the original file. The new .png files render fine in the task interface, but if I click to enlarge or go directly to the permanent_url, no luck.

Thanks!

Hi @Angel_Lemke!

Have you tried using the opt_fields query parameter to include download_url and/or permanent_url? These fields are optional and aren’t returned by default, so you’ll need to explicitly request them via opt_fields to have them included in the response.

Best,
Dominik

Yes, that is how I am getting them. That’s not the question.

Thanks for clarifying! If I understand correctly, the issue is that the permanent_url you’re receiving aren’t working as expected.

If that’s the case, it may be due to corrupted or invalid file content. This can sometimes happen during encoding or when converting files in your code. To validate this, I’d recommend testing your workflow in our API Reference, ensuring that the PNG file converted from HEIC file isn’t broken and you can open it before uploading.

I was able to reproduce the behavior you described by uploading a broken file. The attachment appears on the task, but it can’t be previewed or enlarged, and the permanent_url doesn’t work. The download_url is still accessible, but the downloaded file itself is corrupted.

Let me know if this helps!

2 Likes

Got it! I was afraid that was it. I will have to look into my file conversion process & figure out why the files are corrupted. Thanks for checking it out.

1 Like