[READ-ONLY] Mirror of https://github.com/danielroe/dwaring87-webdev-wedding. Marissa & David's Wedding Website!
0

Configure Feed

Select the types of activity you want to include in your feed.

Image: Fetch Images that don't yet exist

+3 -2
+3 -2
providers/directus.js
··· 156 156 // TEMP: Generate local static images for the specified remote URL 157 157 function _generate(url, full_path_image_dir, full_path_image) { 158 158 return new Promise(async (resolve, reject) => { 159 - const response = await fetch(url); 160 - const buffer = await response.arrayBuffer(); 161 159 162 160 // Make image directory, if not created 163 161 try { ··· 175 173 } 176 174 catch (err) { 177 175 try { 176 + console.log(`curl "${url}" > ${full_path_image}`); 177 + const response = await fetch(url); 178 + const buffer = await response.arrayBuffer(); 178 179 await fs.writeFile(full_path_image, new Buffer.from(buffer)); 179 180 } 180 181 catch (err2) {