如何在其他平台上保存图片以节省系统空间以优化网站? [英] How to save images on other platforms to save space on system to optimize website?

查看:111
本文介绍了如何在其他平台上保存图片以节省系统空间以优化网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个网站,允许用户发布新闻,照片,视频...

I am creating a website that allows users to post news, photos, videos...

我的数据库大致如下:

PostNews_M表具有名为ImgID的列,该列是表Image_M (ImgID, Link)的外键.

PostNews_M table has a column named ImgID, this column is foreign key to the table Image_M (ImgID, Link).

我认为,如果该站点的用户较少且帖子很少,则每个帖子都包含很少的图像,因此存储在服务器上的图像不会有问题.

I think if the site has fewer users with little post, every post has little images, so the images stored on the server does not problem matter.

但是如果网站有一天有更多的用户,则此类图像的存储将出现问题,这将导致服务器存储更多的图像,网站将变得繁琐而缓慢.

But if one day the website has more users, the storage of such image will have problems, it will cause the server to store more images, the website will be heavy and slow.

我认为,当用户发布帖子时,图像将保存在另一个位置,然后列Link将保存图像的url,因此当我加载网站时,系统会调用已被保存的图像url.保存在Link中.

I think that when the user posts the post, the image will be saved in another place, then column Link will save the url of the image, so when i load the website, system will call the image url has been saved in the Link.

我希望有人提出建议,建议我如何处理或如何给我关键字以供学习.

I am looking forward to have someone suggest, advice me how to handle or how to give me keyword to me to learn it.

推荐答案

据我所知,您可以使用 Azure Blob存储来实现.

As far as I know, you could use Azure Blob Storage to do it.

Azure Blob存储可用于存储多种文件,包括新闻,照片,视频.如果您存储需要blob的文件,则每个文件都会有一个 URL .然后,您可以将URL保存到Link列.您可以在门户 Azure Storage Explorer 中找到它们.

Azure Blob Storage can be used to store several kinds of files, including news, photos, videos. If you store the files you need to blob, each of them will have a URL. Then you could save the url to column Link.You can find them in the portal or Azure Storage Explorer.

  • 在门户网站中

  • 在Azure存储资源管理器中

有关更多详细信息,请参阅此文章.

For more details, please refer to this article.

这篇关于如何在其他平台上保存图片以节省系统空间以优化网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆