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

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


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!

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 to see updates on this as we evaluate the request.

Thanks. I am waiting for updates

I found a workaround by using buffer. I just post on github solution => Add support for resouce/fixture files · Issue #972 · elastic/synthetics · GitHub