@wiicode/s3-client 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,32 +4,25 @@ Official TypeScript/JavaScript SDK for WiiCode S3 Upload Service.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### NPM (Recommended)
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install @wiicode/s3-client
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Yarn
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
17
|
-
npm install git+https://github.com/eeyuub/wiis3.service.git#development:packages/client
|
|
18
|
-
|
|
19
|
-
# Or install from specific commit/tag
|
|
20
|
-
npm install git+https://github.com/eeyuub/wiis3.service.git#v1.0.0:packages/client
|
|
16
|
+
yarn add @wiicode/s3-client
|
|
21
17
|
```
|
|
22
18
|
|
|
23
|
-
###
|
|
19
|
+
### PNPM
|
|
24
20
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@wiicode/s3-client": "git+https://github.com/eeyuub/wiis3.service.git#development:packages/client"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @wiicode/s3-client
|
|
31
23
|
```
|
|
32
24
|
|
|
25
|
+
|
|
33
26
|
---
|
|
34
27
|
|
|
35
28
|
## Quick Start
|
|
@@ -38,8 +31,8 @@ npm install git+https://github.com/eeyuub/wiis3.service.git#v1.0.0:packages/clie
|
|
|
38
31
|
import { WiiS3Client } from '@wiicode/s3-client';
|
|
39
32
|
|
|
40
33
|
const s3 = new WiiS3Client({
|
|
41
|
-
endpoint: 'https://
|
|
42
|
-
apiKey: '
|
|
34
|
+
endpoint: 'https://your-s3-service.com',
|
|
35
|
+
apiKey: 'your_api_key',
|
|
43
36
|
});
|
|
44
37
|
|
|
45
38
|
// Upload a file
|
|
@@ -97,8 +90,8 @@ npm install form-data
|
|
|
97
90
|
import { WiiS3Client } from '@wiicode/s3-client';
|
|
98
91
|
|
|
99
92
|
const s3 = new WiiS3Client({
|
|
100
|
-
endpoint: 'https://
|
|
101
|
-
apiKey: '
|
|
93
|
+
endpoint: 'https://your-s3-service.com',
|
|
94
|
+
apiKey: 'your_api_key',
|
|
102
95
|
});
|
|
103
96
|
|
|
104
97
|
// Upload from file input
|
|
@@ -264,22 +257,15 @@ try {
|
|
|
264
257
|
## Environment Variables
|
|
265
258
|
|
|
266
259
|
```env
|
|
267
|
-
WIIS3_ENDPOINT=https://
|
|
268
|
-
WIIS3_API_KEY=
|
|
260
|
+
WIIS3_ENDPOINT=https://your-s3-service.com
|
|
261
|
+
WIIS3_API_KEY=your_api_key
|
|
269
262
|
```
|
|
270
263
|
|
|
271
264
|
---
|
|
272
265
|
|
|
273
266
|
## Obtaining API Keys
|
|
274
267
|
|
|
275
|
-
Contact your administrator to create a tenant and obtain an API key
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
curl -X POST https://wiis3.wiicode.ma/admin/tenants \
|
|
279
|
-
-H "x-admin-key: your_admin_key" \
|
|
280
|
-
-H "Content-Type: application/json" \
|
|
281
|
-
-d '{"name": "my-project"}'
|
|
282
|
-
```
|
|
268
|
+
Contact your service administrator to create a tenant and obtain an API key.
|
|
283
269
|
|
|
284
270
|
---
|
|
285
271
|
|