Ok that method seems promising (pun intended), except it threw this error at me:
I really appreciate your help with this by the way! It’s a frustrating one for sure. lol
Here’s the code I used, as copied from yours. Almost exactly the same, except I removed the comma after the videoArray console.log:
'use strict';
import wixData from 'wix-data';
import { mediaManager } from 'wix-media-backend';
export async function queryArrayTest2() {
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)
}
