Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Fioreski's avatar

File / Blob problems

I am trying to create a new File() type in an Express app that talks to a Laravel app. I am originally creating an absolute url in from a Laravel app using the following method:

$url = Storage::temporaryUrl(
             $filename, now()->addMinutes(20)
        );

This returns to me a browser accessible url that looks something like "https://.....";

I am then passing this to the Express microservice where I am trying to create an Image file and or Blob either will do. The code is as follows:

const imageFile = await fetch(imageUrl);

    const data = await imageFile.blob();

    console.log(data);

However Data always comes back empty. Has anyone had to construct a file type in express before??

0 likes
2 replies

Please or to participate in this conversation.