The code is simple (below), it works perfectly in preview but I get an error (also below) on the live site. Does anyone have any idea why this is happening?
wixData.query("Media/Files")
.find()
.then((results) => {
console.log(results);
});
In preview the code returns an object as expected with 50 items from the media gallery, but on the live site it outputs this error:
Error: WDE0053: Internal wixData error: WDE0054: The server could not fulfill the request
Update: I avoided the issue by loading all the images needed into a custom collection and querying the new collection. That said, this is still an issue because it should be possible to directly query the “Media/Files” collection.