Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.doc.md #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/index.doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,19 @@ 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

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:
Expand All @@ -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' } },
})]
}]
}
Expand Down Expand Up @@ -430,4 +430,4 @@ const features = [
```


To see more examples, you can take a look at the example_app inside the repository.
To see more examples, you can take a look at the example_app inside the repository.