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.