当前位置:   article > 正文

abp .net core_在ASP.NET Core和ABP Framework中使用BLOB存储系统上传/下载文件

abp 自己写的网站如何上传文件可以让别人下载abp

abp .net core

介绍 (Introduction)

This step-by-step article describes how to upload a file to a Web server and also download by client with using ASP.NET Core & ABP Framework. By following this article, you will create a web project and its related code to upload and download files.

本文分步介绍了如何使用ASP.NET Core和ABP Framework将文件上传到Web服务器以及如何通过客户端下载文件。 通过阅读本文,您将创建一个Web项目及其相关代码以上传和下载文件。

Before the creating application, we need to know some fundamentals.

在创建应用程序之前,我们需要了解一些基础知识。

BLOB存储 (BLOB Storing)

It is typical to store file contents in an application and read these file contents on need. Not only files, but you may also need to save various types of large binary objects, a.k.a. BLOBs, into a storage. For example, you may want to save user profile pictures.

通常将文件内容存储在应用程序中,并根据需要读取这些文件内容。 不仅文件,而且您可能还需要将各种类型的大型二进制对象 (也称为BLOB) 保存存储中 。 例如,您可能要保存用户个人资料图片。

A BLOB is a typically byte array. There are various places to store a BLOB item; storing in the local file system, in a shared database or on the Azure BLOB storage can be options.

BLOB通常是字节数组 。 有很多地方可以存储BLOB项目。 可以选择将其存储在本地文件系统,共享数据库或Azure BLOB存储中。

The ABP Framework provides an abstraction to work with BLOBs and provides some pre-built storage providers that you can easily integrate to. Having such an abstraction has some benefits;

ABP框架提供了与BLOB一起使用的抽象,并提供了一些可以轻松集成到的预构建存储提供程序。 具有这样的抽象有一些好处。

  • You can easily integrate to your favorite BLOB storage provides with a few lines of configuration.

    您可以通过几行配置轻松地集成到您喜欢的BLOB存储中。

  • You can then easily change your BLOB storage without changing your application code.

    然后,您可以轻松更改 BLOB存储,而无需更改应用程序代码。

  • If you want to create reusable application modules, you don’t need to make assumption about how the BLOBs are stored.

    如果要创建可重用的应用程序模块 ,则无需假设BLOB的存储方式。

ABP BLOB Storage system is also compatible to other ABP Framework features like multi-tenancy.

ABP BLOB存储系统还与其他ABP框架功能(如多租户)兼容。

To get more information about ABP BLOB Storing system, please check this documentation.

要获取有关ABP BLOB存储系统的更多信息,请查阅此文档

准备项目 (Preparing the Project)

启动模板和初始运行 (Startup template

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/145193
推荐阅读
相关标签
  

闽ICP备14008679号