1. Preface
Picture bed usage scenarios, for example, we build a blog website by ourselves, and then we can choose to store the pictures in the blog on the server, but the access speed may be slow in this way, and we can also use common CDN acceleration services such as Qiniu Cloud. We can also build a free picture bed by ourselves and upload pictures here.
The effect is as follows:
[White prostitution] Use gitee to add a free image bed to the project
2.Gitee warehouse
First, we create a warehouse on Code Cloud, and pay attention to setting it as public. Then find your own private token
3. Get the code
Note: Need to add the hutool tool jar package to the project
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.2.3</version>
</dependency>
Follow the public account 理木客
backstage reply:, Gitee图床
you can get the complete code