Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a large cloud disk with unlimited speed and 5% free of charge in Serverless

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Many novices are not very clear about how to build a large cloud disk with unlimited speed of 5% free of charge in Serverless. In order to help you solve this problem, the editor below will explain it in detail. People with this need can come and learn. I hope you can learn something.

Everyone should have experienced the pain of network disk speed limit. when we finally found resources on the network to download, we found that the download speed was no more than 200,000 and 300KB/S, which reminded me of the Internet speed when I used the telephone line to dial up the Internet at home in junior high school, and a 4GB system mirror would take a whole day.

Some people may say, you can charge money to open a member.

Oh, do you think I am the money for the annual fee member? joke

Yes, poor only one word, I will only say once, we can not imagine the happiness of the rich.

So is there any way to save the country? Cut the crap and take pictures!

Effect display

Set up the home page of cloud disk

Test the file upload speed

Test the file download speed

As you can see, the upload and download speed of the entire network disk is still acceptable (I am Unicom's 100m broadband), which will be much faster than the general network disk download speed limit. In addition, based on the parsed onedrive straight chain, we can easily implement the online preview of files, as shown in the following figure:

Audio files can be played directly online

You can even preview the office three-piece set online.

You can see whether the cloud disk function we built using Serverless+OneDrive is pretty good. Of,

Are you already eager to try? Start the tutorial now, Let's go~~~

Practical practice course 1. Get OneDrive

First, sign up for an OneDrive account.

two。 Download OneManager

OneManager-php is a list indexing and manager for Onedrive that can be deployed to the heroku/SCF/normal space.

It is worth noting that the file uploads and downloads of this program go to the OneDrive server and will not consume your cloud function traffic.

After downloading, decompress:

3. Create a new cloud function

Open the SCF console

Cloud function console

Here, we select the function region to Hong Kong, China, and then click New

Select php7.2 for the running environment, select the blank function for the creation method, and click next to finish.

After the function is created, open the function code, select the local upload folder, upload our previously decompressed OneManager-php program, and choose to save it.

OK, the function will be normal this time.

4. Configure Cloud function

After the cloud function is created, we also need to configure various parameters of the cloud function.

Here we change the memory to 64MB and the timeout to 5 seconds (set at will)

The most important thing is to add a Region=ap-hongkong environment variable, and then click Save.

To add a function api gateway trigger, be sure to check enable integration response, and then save it.

After the api gateway is successfully added, you will get an access address. Let's copy it and open it in the browser.

5. Configure OneManager

To visit the OneManager home page for the first time, you need to install the initialization program. We follow the prompts and click to start the installer.

SecretId and SecretKey can be found in the console key management page, and then click OK to set the administrative login password to access the OneManager home page.

6. Bind OneDrive

What? Why have I initialized the program? why is it still blank?

Don't worry, this is because we haven't bound our own OneDrive network disk yet.

First of all, click on the upper left corner of the home page to log in, enter the administrator password you set before, and then click the settings options in the upper left corner to open the settings page.

Choose to add an OneDrive disk and follow the prompts on the web page to log in to your OneDrive authorization. I won't go into details here.

7. Bind a registered domain name

Of course, we can customize the domain name of the api gateway, but the domain name here is for the record.

Assuming that you already have a registered domain name and have successfully configured the cloud function and the api gateway, let's take a look at the steps to customize the domain name for the api gateway.

First, open the Tencent Cloud api gateway backend page, select the api gateway just created by the cloud function, and open the custom domain option.

Then click New, resolve the license domain cnmae to be bound to the prompted address, and select the default path mapping to submit.

Finally, remember to publish the updated api gateway service after modifying the custom domain name, so that the custom domain name will take effect.

If there is no surprise, now you can access the cloud disk through your own binding domain name, just like me.

The title says that large-capacity cloud disks are built for free. Free means that Tencent Cloud functions have a certain amount of free use every month, which is more than enough to build OneDrive cloud disks for self-use.

In addition, OneManager supports binding multiple OneDrive disks. The reason for the large capacity here is that I bound a total of 4 OneDrive disks, which happens to be aliased as Wind, Rain, Thunder and electricity. Haha (a cruel person)

Each disk has the capacity of 5TB, which adds up to a total capacity of 20TB, hehe.

What can't be saved? all video and music documents can be previewed online. Don't be too cool ~ have a good time!

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report