I’m trying to build a custom documents/files upload handler with Digitalocean Spaces. What I try to aceive is a Mutation calles fileUpload that receives a filename and a base64 string. Before uploading, I’ll need to temporarily save the file with
fs.writeFileSync(). Unfortunately, this gives me the error message
"EROFS: read-only file system, open ./path/file.pdf".
Is there any workaround on this? What’s the go-to way to handle file-uploads to file storage services in custom functions?
Any help is greatly appreciated