# Saving psd document without update photoshop document

**URL:** <https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312>\
**Category:** Photoshop\
**Created:** [December 8, 2020, 12:26pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312 "2020-12-08T12:26:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guircasimiro](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/guircasimiro/32/1072_2.png) [@guircasimiro](https://forums.creativeclouddeveloper.com/u/guircasimiro)\
**Post date:** [December 8, 2020, 12:26pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312/1 "2020-12-08T12:26:25Z")

</div>

I’m struggling with an issue when I try to save the activeDocument to a temporary file.

Let’s say I’m with a PSD file opened in my photoshop, and this PSD is stored at the normal user file system (not a temporary folder), but I need to upload this actual document (PSD) to an API so I’m calling the `activeDocument.save(tempFile)` to save this document to a tempFolder so I can upload this document without asking for user permissions.

This works as expected, I can do the upload, but I noticed that when I go to photoshop and click to reveal the active document in Explorer, then Photoshop shows that the active document is the file I previously saved when I did `activeDocument.save(tempFile)`.

There is anyway I can avoid this behavior or there is another to accomplish my goal (upload the active document without user permission)? I think this can break the flow of a designer, because this temporary folder and its content will be deleted.

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [December 8, 2020, 1:17pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312/2 "2020-12-08T13:17:44Z")

</div>

You could duplicate document into new window. The duplicate has no fileReference. And close it once you are done. Or you could try a luck with “save as a copy” flag.

---

<div class="post-metadata">

**Author:** ![guircasimiro](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/guircasimiro/32/1072_2.png) [@guircasimiro](https://forums.creativeclouddeveloper.com/u/guircasimiro)\
**Post date:** [December 8, 2020, 1:47pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312/3 "2020-12-08T13:47:37Z")

</div>

Right, I’m new into uxp plugins, I’m working in my first one.

This “save as a copy” flag I know it was available in CEP extensions by passing an extra argument, but following the docs of uxp I didn’t find anything related to it, I also didn’t find anything related to duplicate the document into a new window. How can I duplicate my current document?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [December 8, 2020, 2:21pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312/4 "2020-12-08T14:21:30Z")

</div>

[![](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/c/c0278793cf23a0f1a2c4fabd242d69a1cec56c1d.jpeg "Adobe UXP: Things you need to know! #7 BatchPlay (part 2): the Alchemist listener") ](https://www.youtube.com/watch?v=aZn_6X6nvUM)

---

<div class="post-metadata">

**Author:** ![guircasimiro](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/guircasimiro/32/1072_2.png) [@guircasimiro](https://forums.creativeclouddeveloper.com/u/guircasimiro)\
**Post date:** [December 8, 2020, 6:02pm UTC](https://forums.creativeclouddeveloper.com/t/saving-psd-document-without-update-photoshop-document/2312/5 "2020-12-08T18:02:50Z")

</div>

Thanks so much!

This helped me a lot 🙂
