Ok, I was afraid that wouldn’t like the await in the promise. Another thing to try is to await the database query as well and not have the promise at all. Something like this:
‘use strict’;
import wixData from ‘wix-data’;
import { mediaManager } from ‘wix-media-backend’;
export async function queryArrayTest() {
var videoArray = []
let results = await wixData.query("AllGuestUploads-Video")
.eq("eventId", "bbfd431b-f957-40bc-89e9-d05c19e6edc2")
.eq("includeInHighlight", true)
.ascending("chapterNumber", "orderInCategory")
.find();
let fullUploadData = results.items
console.log("fullUploadData", fullUploadData)
// Create new array for the videoField //
videoArray = fullUploadData.map(({ videoField }) => videoField)
console.log("videoArray", videoArray),
// GET DOWNLOAD URLS OF VIDEOS //
let urlVideoArray = [];
for (const fileName of videoArray) {
let video = await mediaManager.getDownloadUrl(fileName);
urlVideoArray.push(video)
}
console.log("urlVideoArray", urlVideoArray)
}