Original address:https://www.wjcms.net/archives/halo Blog configuration alicloud OSS upload attachment
In the past, we used to upload locally, but when the finished blog was copied to other platforms for publishing, there was a cross domain problem. If cloud OSS storage was used, this problem would not occur. Therefore, we still need to configure cloud OSS storage. Here we choose Alibaba cloud OSS, and we will start to configure it.
Get user accessKey
Move the mouse to the user icon and click access key management
Choose to use sub users
Enter the login name and display name
Program access checked
Click OK, and then use the mobile phone to get the verification code to create a good user.
Then save the accessKey information locally. If you can’t see it later, you need to create it again.
Note: if you open the access key again, you can only access the information after closing it.
Click the user on the left again to see the successful user.
The back side has add permission, click.
In the OSS, select the system search box
Aliyunossfullaccess manage object storage service (OSS) permissionsa line
See one on the right
AliyunOSSFullAccessYou can select it, and then click confirm.
At this point, the user is created, and the permissions are assigned.
Enter the halo blog console and select the system on the bottom left, blog settings, and attachment settings.
Modify the storage location to: alicloud
There will be a lot more to fill in the form.
Binding domain name protocol: HTTPS Binding domain name: If not, the path root domain name will be bucket + endpoint Bucket： Endpoint: Access Key： Access Secret： File directory:
Now, let’s talk about the format and how to get it one by one.
1. Binding domain name protocol: HTTPS
Here, you need to set up HTTPS. At the same time, you need to set up HTTPS for storage objects
2. Binding domain name:
If not, the path root domain name will be bucket + endpoint
Note: it is not recommended to fill in and configure your own domain name, because if you want to publish to other platforms in the future, it involves cross domain images and cannot upload images. It can be blank by default.
This is the name of the library just created. You can fill in it directly
Enter the OSS object console, click the bucket page, and you can see the following. Select the Internet to access the corresponding endpoint.
5. Access key and access secret
The information just saved.
6. File directory:
You can set the root directory and fill in /.
Fill in the subdirectory needs to be created, for example: blog/
Note: be sure to add/
How to create a directory:
On the bucket page, click file management on the left, where you can create a new directory and click Add.
In addition, the following strategies are optional, which will not be explained here and will be studied by ourselves.
Fill in the above information, save it, and return to the attachment page to find that OSS exists in the uploaded file.
Follow me and share articles every day.