@things-factory/attachment-base 7.0.0-alpha.0 → 7.0.0-alpha.1
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.
@@ -0,0 +1,17 @@
|
|
1
|
+
# attachmentPath
|
2
|
+
|
3
|
+
첨부파일의 URL의 기본 path 정보.
|
4
|
+
|
5
|
+
예를 들어, 첨부파일의 id가 'abcde12345' 이고, attachmentPath설정이 'attachments' 이면, 브라우저에서 첨부파일을 조회하기 위한 URL은 다음과 같다.
|
6
|
+
|
7
|
+
```
|
8
|
+
https://server-ip:port/attachments/abcde12345
|
9
|
+
```
|
10
|
+
|
11
|
+
## default
|
12
|
+
|
13
|
+
```
|
14
|
+
module.exports = {
|
15
|
+
attachmentPath: 'attachment',
|
16
|
+
}
|
17
|
+
```
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# storage
|
2
|
+
|
3
|
+
첨부파일이 보관될 스토리지의 타입과 관련된 옵션 정보를 설정한다.
|
4
|
+
|
5
|
+
## filesystem backed storage
|
6
|
+
|
7
|
+
- type: 'file'
|
8
|
+
- base: folder
|
9
|
+
|
10
|
+
## database backed storage
|
11
|
+
|
12
|
+
- type: 'database'
|
13
|
+
|
14
|
+
## AWS S3 bucket backed storage
|
15
|
+
|
16
|
+
- type: 's3'
|
17
|
+
- accessKeyId: 'YOUR ACCESS KEY ID',
|
18
|
+
- secretAccessKey: 'YOUR SECRET ACCESS KEY',
|
19
|
+
- bucketName: 'YOUR S3 BUCKET NAME',
|
20
|
+
- region: 'YOUR S3 REGION'
|
21
|
+
|
22
|
+
## Azure Blob backed storage
|
23
|
+
|
24
|
+
- type: 'azureblob'
|
25
|
+
- accountName: '{account-name}',
|
26
|
+
- accountKey: '{account-key}',
|
27
|
+
- containerName: '{container-name}',
|
28
|
+
- url: 'https://{account-name}.blob.core.windows.net/',
|
29
|
+
- connectionString: 'DefaultEndpointsProtocol=https;AccountName={account-name};AccountKey={account-key};EndpointSuffix=core.windows.net'
|
30
|
+
|
31
|
+
## default
|
32
|
+
|
33
|
+
```
|
34
|
+
module.exports = {
|
35
|
+
storage: {
|
36
|
+
type: 'file',
|
37
|
+
base: 'attachments'
|
38
|
+
}
|
39
|
+
/* storage configurations
|
40
|
+
--
|
41
|
+
storage: {
|
42
|
+
type: 'file', // for filesystem backed
|
43
|
+
base: 'attachments'
|
44
|
+
}
|
45
|
+
--
|
46
|
+
storage: {
|
47
|
+
type: 'database' // for database backed
|
48
|
+
}
|
49
|
+
--
|
50
|
+
storage: {
|
51
|
+
type: 's3', // for s3-bucket
|
52
|
+
accessKeyId: 'YOUR ACCESS KEY ID',
|
53
|
+
secretAccessKey: 'YOUR SECRET ACCESS KEY',
|
54
|
+
bucketName: 'YOUR S3 BUCKET NAME',
|
55
|
+
region: 'YOUR S3 REGION'
|
56
|
+
}
|
57
|
+
--
|
58
|
+
storage: {
|
59
|
+
type: 'azureblob', // for azure-blob-storage
|
60
|
+
accountName: '{account-name}',
|
61
|
+
accountKey: '{account-key}',
|
62
|
+
containerName: '{container-name}',
|
63
|
+
url: 'https://{account-name}.blob.core.windows.net/',
|
64
|
+
connectionString:
|
65
|
+
'DefaultEndpointsProtocol=https;AccountName={account-name};AccountKey={account-key};EndpointSuffix=core.windows.net'
|
66
|
+
}
|
67
|
+
*/
|
68
|
+
}
|
69
|
+
```
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/attachment-base",
|
3
|
-
"version": "7.0.0-alpha.
|
3
|
+
"version": "7.0.0-alpha.1",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -29,12 +29,11 @@
|
|
29
29
|
"@aws-sdk/s3-presigned-post": "^3.46.0",
|
30
30
|
"@azure/storage-blob": "^12.16.0",
|
31
31
|
"@koa/multer": "^3.0.0",
|
32
|
-
"@things-factory/auth-base": "^7.0.0-alpha.
|
32
|
+
"@things-factory/auth-base": "^7.0.0-alpha.1",
|
33
33
|
"@things-factory/env": "^7.0.0-alpha.0",
|
34
|
-
"@things-factory/shell": "^7.0.0-alpha.
|
35
|
-
"memfs": "^3.0.1",
|
34
|
+
"@things-factory/shell": "^7.0.0-alpha.1",
|
36
35
|
"mime": "^3.0.0",
|
37
36
|
"multer": "^1.4.5-lts.1"
|
38
37
|
},
|
39
|
-
"gitHead": "
|
38
|
+
"gitHead": "778315d165d7f15e147583a45d5079c3d7cbce38"
|
40
39
|
}
|