From 15409d00fb627d678bf7a24bdd3144d8187efff5 Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:19:14 +0300 Subject: [PATCH] fix backend-nodejs-ipfs-file-uploader-with-filebase.mdx --- .../backend-nodejs-ipfs-file-uploader-with-filebase.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/basic-tutorials/backend-nodejs-ipfs-file-uploader-with-filebase.mdx b/pages/basic-tutorials/backend-nodejs-ipfs-file-uploader-with-filebase.mdx index 30012b1bd..87017bf56 100644 --- a/pages/basic-tutorials/backend-nodejs-ipfs-file-uploader-with-filebase.mdx +++ b/pages/basic-tutorials/backend-nodejs-ipfs-file-uploader-with-filebase.mdx @@ -429,7 +429,7 @@ FILEBASE_REGION=us-east-1 FILE_SERVER_URL=http://localhost:5002 ``` -What we want to do is create a way so that when we’re running in `development` mode that the files upload to our local `bucket` folder, but when we’re in production mode, the files upload to IPFS with Filebase. To do this, we’re going to take advantage of our `NODE_ENV` and modify our `upload` middleware to use a different multer configuration when the `NODE_ENV` is set to production. More specifically, we’ll be using an extension of `multer` called `multer-s3` that handles requests regularly to AWS S3 but because Filebase is an AWS S3 compatible service, we’ll just configure it to point to Filebase. +What we want to do is create a way so that when we’re running in `development` mode the files upload to our local `bucket` folder, but when we’re in production mode, the files upload to IPFS with Filebase. To do this, we’re going to take advantage of our `NODE_ENV` and modify our `upload` middleware to use a different multer configuration when the `NODE_ENV` is set to production. More specifically, we’ll be using an extension of `multer` called `multer-s3` that handles requests regularly to AWS S3 but because Filebase is an AWS S3 compatible service, we’ll just configure it to point to Filebase. File: `./src/app.ts`