Songo posted an article encouraging people to do more blogging (if you haven’t written a blog before, now is the best time to do it), and I’m glad to hear that my advice has helped a little.

Today, I would like to share with you a common technical problem in the process of blog writing, which is where to save blog pictures. Because Songko himself recently made a free chart bed, the feeling is still quite fragrant, so share with the big guy.

Wild times

First of all, when I started to write a blog, I directly opened the background editor of the blog platform and started to write. After writing, I saved and published it. In the process of writing, I might need to upload pictures, so I did a good job uploading pictures. After a long time, I tried to organize my blog into a series, only to find that I had to re-copy the documents from the website, and the images that came down were automatically watermarked by the blogging platform.

Later, I learned to use vscode to write my blog locally. The images I need are numbered and placed in order, and then introduced in Markdown through a relative path, like the following:

Write well, then copy to the blog website can be published. That way, I have a local archive, which is why you can see the 274-page offline version of the Spring Boot tutorial that Songo compiled. This will come in handy one day if I want to reorganize or refine the article.

There is no problem with vscode, but many friends use some note-taking software, such as Evernote and Youdao Note, etc. If you use note-taking software, it will not be so convenient to quote pictures. At this time, if we have our own graph bed, it will be much more convenient.

For their chart bed, I have two requirements:

  • stable
  • Pictures numbered in order

No need to say more about stability, picture numbering orderly, this is very key, it is related to the future whether you can easily find your own picture, and free graph bed is a random string to do the name of the picture, this is not very convenient, so I want to build a map bed.

Just before I heard that Seven Niuyun has a free 10G space to build a personal chart bed, I have not had a chance to try, this time I tried, I did not expect the whole process is quite smooth, so I recorded and shared with my friends.

Build figure bed

We need to do two aspects of preparation work first:

  1. Have a registered domain name of your own. Earlier this was not required, but now it is required. When we apply for storage on Qiuniuyun, a temporary secondary domain name will be generated, which is valid for 1 month, so we have to prepare a domain name of our own in advance.
  2. Prepare a seven cattle cloud account, and real name authentication, this does not need me to say more, website registration + upload ID card authentication, this is the basic operation.

Okay, with those two things in place, we can start building our chart bed.

Firstly, click the management console on the homepage of Qiuniuyun website to enter the management console page, then select the first object storage, and click Add Now.

Then give the new storage space a name, choose the appropriate storage area, because we are to build our own map bed, so the last access control choose open, do not choose wrong.

After that, let’s configure the domain name.

First click CDN on the left menu bar, then click Domain Name Management.

By default, there is only one test domain name, we click on the top of the add domain name, add your own domain name, if there is no special requirements, you can configure the domain name address, use the default:

Other options, you can configure according to the actual situation, I won’t say each one, configure at least one domain name, you can use later. After the configuration is complete, save it.

After saving, you will be given a CNAME, which is essentially a temporary secondary domain name:

Copy the CNAME, then open your DNS console and add a CNAME resolution record as follows:

Note the configuration here:

  • Since we initially added the domain name to img.javaboy.com, the host record here is img, do not write wrong
  • The record type is CNAME. This cannot be changed
  • The default line type is ok
  • The record value is the CNAME you copied

All other Settings are default. After the configuration is complete, save the Settings.

So what does this domain name configuration mean? I’m going to give you a little bit of an overview here. After we put the photos to seven NiuYun will certainly generate a access path, abc-javaboy.qiniu.com/111.png, for example, the visit… In a month. In a month, it will expire. So, we need to configure our own domain name, such as img.javaboy.com, but when I visit img.javaboy.com/111.png, I want this address to point to seven niuyun, how to do? This time will rely on a CNAME resolution, it can resolve the domain name to another domain name.

OK, after all these things are done, wait for a moment, about 10 minutes, in the space management -> space overview, see the CDN accelerated domain name status is successful, all our configuration is OK.

Next go to Space Management -> Space Overview, click Upload file, you can upload the file. After the file has been successfully uploaded, click more on the right to copy the file link.

The whole operation process is relatively Easy, there is no difficulty.

PicGo upload

Every time you need to upload pictures, have to open the seven niuyun background, which is obviously some trouble, so someone developed a lot of good client tools, Songge after a variety of pits, feeling PicGo is better to use, in Mac/Windows are supported, very convenient, so use this to do file upload.

PicGo can be downloaded from GitHub. Choose the appropriate version for your system: github.com/Molunerfinn… .

Download and install, this I do not need to say, ordinary software installation.

After installation, in the diagram bed configuration inside, configure the seven cattle diagram bed:

AccessKey and SecretKey can be seen from your personal center page in the background of Qiniu, and can be copied directly. The storage space name is the storage space you created initially, and the access address is your domain name, such as img.javaboy.org. Storage area according to the initial selection of South/East/North China, fill in according to the actual situation, but pay attention to fill in the area abbreviation:

After the configuration is complete, you can drag and drop the image to the upload area and upload it. After uploading successfully, the image access path will be returned. These are relatively simple and will not be described again.

Well, this is today and partners to share the free build their own chart bed, blogging partners, you can try oh. Smells good.