From f4b14a9ebcdb8128728d251178e8042c6f3bc84c Mon Sep 17 00:00:00 2001 From: Shivam Verma <50954641+sarcastic-verma@users.noreply.github.com> Date: Sun, 23 May 2021 02:17:58 +0530 Subject: [PATCH] Update index.doc.md fixed possible confusion regarding different folder names in local upload provider --- src/index.doc.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.doc.md b/src/index.doc.md index 1eba73f..01e38ef 100644 --- a/src/index.doc.md +++ b/src/index.doc.md @@ -159,11 +159,11 @@ Local storage will save files to the local folder. There are 2 things you have to do before using this Provider. -#### 1. create the*folder** (`bucket`) for the files (i.e. `public`) +#### 1. create the*folder** (`bucket`) for the files (i.e. `uploads`) ```sh cd your-app -mkdir public +mkdir uploads ``` #### 2. tell your HTTP framework to host this folder @@ -171,7 +171,7 @@ mkdir public This is an example for the [express](https://expressjs.com) server ``` -app.use('/uploads', express.static('uploads')); +app.use('/uploads', express.static(path.join(__dirname, '../uploads'))); ``` Next you have to add @admin-bro/upload to given resource: @@ -181,7 +181,7 @@ Next you have to add @admin-bro/upload to given resource: resources: [{ resource: User, features: [uploadFeature({ - provider: { local: { bucket: 'public' } }, + provider: { local: { bucket: 'uploads' } }, })] }] } @@ -430,4 +430,4 @@ const features = [ ``` -To see more examples, you can take a look at the example_app inside the repository. \ No newline at end of file +To see more examples, you can take a look at the example_app inside the repository.