# \[Playwright\]\[upload\] error executing step: ENOENT: no such file or directory, open './images/demo.jpg'

**URL:** <https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085>\
**Category:** Synthetics\
**Created:** [November 5, 2024, 4:39pm UTC](https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085 "2024-11-05T16:39:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danydilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danydilla/32/138979_2.png) [@danydilla](https://discuss.elastic.co/u/danydilla)\
**Post date:** [November 5, 2024, 4:39pm UTC](https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085/1 "2024-11-05T16:39:44Z")

</div>

Hi all, i write synthetic test using playwright.  
I want to trigger a post request that do an upload image. Example

```auto

import * as fs from 'fs'
...
const imageFile = fs.readFileSync(`./images/demo.jpg`)
...
{
  headers: {
    Accept: 'application/json',
    Authorization: 'Bearer 437a7a2b4d07c66c4b0f07d3900816a6'
  },
  multipart: {
    id: 'myId-1234',
    time: 1730823793,
    picture: {
      name: 'picture',
      mimeType: 'image/jpg',
      buffer: imageFile
    },
  }
}

```

...  
when i execute this code _it works from my local machine_ (npx @elastic/synthetics journeys) but in ELK it cannot locate image : Error running test

**error executing step: ENOENT: no such file or directory, open './images/demo.jpg'**

My question is: how to retrieve my imageFile path so then i can trigger the request properly? Thanks for your help!

---

<div class="post-metadata">

**Author:** ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)\
**Post date:** [November 5, 2024, 6:05pm UTC](https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085/2 "2024-11-05T18:05:26Z")

</div>

Hi @danydilla - thanks for your interest in using Synthetics.

At this time, this is not a feature we support. You can track [Add support for resouce/fixture files · Issue #972 · elastic/synthetics · GitHub](https://github.com/elastic/synthetics/issues/972) to see updates on this as we evaluate the request.

---

<div class="post-metadata">

**Author:** ![danydilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danydilla/32/138979_2.png) [@danydilla](https://discuss.elastic.co/u/danydilla)\
**Post date:** [November 6, 2024, 8:49am UTC](https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085/3 "2024-11-06T08:49:23Z")

</div>

Thanks. I am waiting for updates

---

<div class="post-metadata">

**Author:** ![danydilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danydilla/32/138979_2.png) [@danydilla](https://discuss.elastic.co/u/danydilla)\
**Post date:** [November 6, 2024, 1:52pm UTC](https://discuss.elastic.co/t/playwright-upload-error-executing-step-enoent-no-such-file-or-directory-open-images-demo-jpg/370085/4 "2024-11-06T13:52:05Z")

</div>

I found a workaround by using buffer. I just post on github solution =\> [Add support for resouce/fixture files · Issue #972 · elastic/synthetics · GitHub](https://github.com/elastic/synthetics/issues/972#issuecomment-2459805780)
