Skip to content

Instantly share code, notes, and snippets.

Avatar
🌲
(◍•﹏•)

Patrick Campbell ptcampbell

🌲
(◍•﹏•)
View GitHub Profile
@ptcampbell
ptcampbell / nextjs-file-upload-api.js
Last active Apr 24, 2020 — forked from agmm/nextjs-file-upload-api.js
Azure Blob Storage Next.js Upload
View nextjs-file-upload-api.js
import formidable from 'formidable'
const fs = require('fs')
const { BlobServiceClient } = require('@azure/storage-blob')
if (process.env.NODE_ENV !== 'production') {
require('dotenv').config()
}
const AZURE_STORAGE_CONNECTION_STRING =
process.env.AZURE_STORAGE_CONNECTION_STRING