Error: ENOENT: no such file or directory

Hi,

I’m creating a service in Backendless API Services, but when I try to read a file using:

fs.readFile(‘full_path_to_backendless_hosted_file’)

I receive an ENOENT: no such file or directory error.

The file have permissions. I can see it from several explorers and diferent machines.

The file is created using Backendless.Files.saveFile without problem, the problem is when I try to read from API Services with node fs

Hi @Dario_Castaneda,

Direct file system is restricted since this is a shared hosting environment. You need to fetch the file using the URL assigned to it.

Regards,
Mark

Hi Mark,

I feel dumb, I see what was my problem, The call must be a http get instead fs function. Thank you