# How can I download image in Confluence Page?

**URL:** <https://community.developer.atlassian.com/t/how-can-i-download-image-in-confluence-page/86384>\
**Category:** Forge\
**Tags:** confluence, image, rest-api\
**Created:** [November 20, 2024, 7:56am UTC](https://community.developer.atlassian.com/t/how-can-i-download-image-in-confluence-page/86384 "2024-11-20T07:56:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hirokinishimaki](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@hirokinishimaki](https://community.developer.atlassian.com/u/hirokinishimaki)\
**Post date:** [November 20, 2024, 7:56am UTC](https://community.developer.atlassian.com/t/how-can-i-download-image-in-confluence-page/86384/1 "2024-11-20T07:56:36Z")

</div>

I want to download image with asApp() and paste it other product with api.  
I will show my code following.

const baseUrl = “[https://example.atlassian.net/wiki](https://example.atlassian.net/wiki)”;  
const downloadUrl = attachment.\_links.download;  
const fullImageUrl = `${baseUrl}${downloadUrl}`;

```
const imageResponse = await asApp().requestConfluence(route`fullImageUrl`, { method: 'GET' });
console.log('imageResponse: ', imageResponse);

```

The baseUrl is my site url and downloadUrl is like following.

/download/attachments/{my-page-id}/{my-image-filename}?version=1&modificationDate=1731594031029&cacheVersion=1&api=v2

This won’t work because of disallowing path manipulation attempt.

Please tell me where to fix.
