You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github-tools.github.io/github-release-notes/)
9
9
10
-
This component can upload file to Aliyun-OSS easily.
11
-
12
-
You can configure OSS information through environmental variables, customize domain, support multi-selection, limit file size, delete, paste to upload, drag and drop to upload, make files upload simpler.
@@ -26,16 +24,16 @@ You can configure OSS information through environmental variables, customize dom
26
24
27
25
## Feature
28
26
29
-
-Pure front-end implementation, no need for backend cooperation
30
-
-The upload function can be done with little oss configuration
31
-
-Automatically compress pictures before uploading, and loading prompts during uploading, support picture display and deletion
32
-
-With default styles and support customize
33
-
-Can limit the size or the number of files to upload
34
-
-Support paste screenshot to upload
35
-
-Can drag and drop to upload
36
-
-Can preivew img
27
+
-纯前端实现,不需要后台配合
28
+
-只需配置 OSS 的基本信息,即可实现上传功能
29
+
-上传前自动压缩图片,上传过程中有 loading 提示,支持图片显示及删除
30
+
-可拓展自定义 loading 和默认上传样式
31
+
-可限制上传文件大小和上传文件数量
32
+
-可截图粘贴上传
33
+
-可拖拽上传
34
+
-可预览图片
37
35
38
-
[⬆Back to Top](#table-of-contents)
36
+
[⬆Back to Top](#table-of-contents)
39
37
40
38
## Links
41
39
@@ -46,46 +44,59 @@ You can configure OSS information through environmental variables, customize dom
46
44
47
45
## Install
48
46
49
-
```bash
47
+
```sh
50
48
yarn add @femessage/upload-to-ali
51
49
```
52
50
53
-
[⬆Back to Top](#table-of-contents)
51
+
[⬆Back to Top](#table-of-contents)
54
52
55
53
## Config
56
54
57
-
The following props are required:`accessKeyId` - Created by Alibaba Cloud Console `accessKeyId`<br />`accessKeySecret` - Created by Alibaba Cloud Console `accessKeySecret`<br />`bucket` - Storage space name<br />`region` - Alibaba Cloud area name
55
+
使用时组件以下四个参数必传:
56
+
57
+
`accessKeyId` - `阿里云控制台创建的access key`
58
+
59
+
`accessKeySecret` - `阿里云控制台创建的access secret`
60
+
61
+
`bucket` - `存储空间的名字`
58
62
59
-
[Be sure to set cross-domain and ACL before using](https://help.aliyun.com/document_detail/32069.html?spm=a2c4g.11186623.6.920.9ddd5557vJ6QU7)
Recommend using environment variables to configure OSS parameters<br />With dotenv, we just need to write the environment variable in `.env`. With CI tools, this can meet the needs of using different OSS in different environments without change the source code.<br />Here are all can passed-in environment variables
71
+
推荐使用环境变量配置 OSS 参数
72
+
73
+
使用 dotenv,我们只需要将环境变量配置写在`.env`文件中,配合 CI 工具,可满足同一套代码在不同环境对接不同 OSS 的需求
vue-cli3 offers an easy solution to replace [process.env](https://cli.vuejs.org/zh/guide/mode-and-env.html#%E6%A8%A1%E5%BC%8F), but it requires a pattern(VUE*APP*\*) to inject in client side. So we need to use `dotenv-webpack`'s solution.
[](https://github-tools.github.io/github-release-notes/)
This component can upload file to Aliyun-OSS easily.
11
+
12
+
You can configure OSS information through environmental variables, customize domain, support multi-selection, limit file size, delete, paste to upload, drag and drop to upload, make files upload simpler.
-Pure front-end implementation, no need for backend cooperation
32
+
-The upload function can be done with little oss configuration
33
+
-Automatically compress pictures before uploading, and loading prompts during uploading, support picture display and deletion
34
+
-With default styles and support customize
35
+
-Can limit the size or the number of files to upload
36
+
-Support paste screenshot to upload
37
+
-Can drag and drop to upload
38
+
-Can preivew img
37
39
38
-
[⬆Back to Top](#table-of-contents)
40
+
[⬆Back to Top](#table-of-contents)
39
41
40
42
## Links
41
43
@@ -46,59 +48,46 @@
46
48
47
49
## Install
48
50
49
-
```sh
51
+
```bash
50
52
yarn add @femessage/upload-to-ali
51
53
```
52
54
53
-
[⬆Back to Top](#table-of-contents)
55
+
[⬆Back to Top](#table-of-contents)
54
56
55
57
## Config
56
58
57
-
使用时组件以下四个参数必传:
58
-
59
-
`accessKeyId` - `阿里云控制台创建的access key`
60
-
61
-
`accessKeySecret` - `阿里云控制台创建的access secret`
62
-
63
-
`bucket` - `存储空间的名字`
59
+
The following props are required:`accessKeyId` - Created by Alibaba Cloud Console `accessKeyId`<br />`accessKeySecret` - Created by Alibaba Cloud Console `accessKeySecret`<br />`bucket` - Storage space name<br />`region` - Alibaba Cloud area name
64
60
65
-
`region` - `根据 存储空间 所在的存储区域, 相应的上传域名`
61
+
[Be sure to set cross-domain and ACL before using](https://help.aliyun.com/document_detail/32069.html?spm=a2c4g.11186623.6.920.9ddd5557vJ6QU7)
使用 dotenv,我们只需要将环境变量配置写在`.env`文件中,配合 CI 工具,可满足同一套代码在不同环境对接不同 OSS 的需求
76
-
77
-
以下是所有可传入的环境变量
67
+
Recommend using environment variables to configure OSS parameters<br />With dotenv, we just need to write the environment variable in `.env`. With CI tools, this can meet the needs of using different OSS in different environments without change the source code.<br />Here are all can passed-in environment variables
vue-cli3 offers an easy solution to replace [process.env](https://cli.vuejs.org/zh/guide/mode-and-env.html#%E6%A8%A1%E5%BC%8F), but it requires a pattern(VUE*APP*\*) to inject in client side. So we need to use `dotenv-webpack`'s solution.
0 commit comments