# I cann\`t copy issue attachment

**URL:** <https://community.developer.atlassian.com/t/i-cann-t-copy-issue-attachment/72867>\
**Category:** Forge UI Kit and Custom UI\
**Tags:** jira-cloud, rest-api\
**Created:** [September 14, 2023, 6:52am UTC](https://community.developer.atlassian.com/t/i-cann-t-copy-issue-attachment/72867 "2023-09-14T06:52:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caiyunCheng](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@caiyunCheng](https://community.developer.atlassian.com/u/caiyunCheng)\
**Post date:** [September 14, 2023, 6:52am UTC](https://community.developer.atlassian.com/t/i-cann-t-copy-issue-attachment/72867/1 "2023-09-14T06:52:18Z")

</div>

I want to copy an issue , I get the issue details , and create new issue successed. But when I copy the attachement with rest api " Add attachment", it got a error, like this

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/5/d/5dcfa642bd6447ebda0820490929dcc2819e4fea.png)

the rest api is:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/8/d/8d6413e4942ebf90fcdddd827da7c9dd3d341691.png)

this is my code: I use attachment.content replace “filePath” in the rest api

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/4/d/4dcde554c84de1deb3c11f3cff4fdfb82af89826.png)

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/f/c/fc810c71e8968cd6df4a32fc926092d7984c93ab.png)

So, how can I copy attachments of an issue in my custom UI forge App ?

---

<div class="post-metadata">

**Author:** ![caiyunCheng](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@caiyunCheng](https://community.developer.atlassian.com/u/caiyunCheng)\
**Post date:** [September 15, 2023, 2:04am UTC](https://community.developer.atlassian.com/t/i-cann-t-copy-issue-attachment/72867/2 "2023-09-15T02:04:31Z")

</div>

Now I resolved it, the code like this:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/f/8/f83360d7783e2e99a115c6c7f04b7240a5c192e7.png)
