bqst
bqst
NNuxt
Created by bqst on 6/6/2024 in #❓・help
Server API & CSV issue
Fixed. Found infos on Vercel: https://vercel.com/guides/how-can-i-use-files-in-serverless-functions#using-nuxt I used :
const assets = useStorage('assets:server')
const productsCsv = await assets.getItem('products.csv')
const products = Papa.parse(productsCsv, { header: true }).data
...
const assets = useStorage('assets:server')
const productsCsv = await assets.getItem('products.csv')
const products = Papa.parse(productsCsv, { header: true }).data
...
2 replies