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

本文介绍了如何在基于ASP.NET Core的应用程序中,结合ABP Framework实现BLOB存储系统,从而进行文件的上传和下载操作。详细探讨了在ABP框架下利用BLOB存储服务进行文件管理的方法。
摘要由CSDN通过智能技术生成

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 templ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值