committed by
GitHub
17 changed files with 167 additions and 338 deletions
@ -1,26 +1,28 @@ |
|||
using System; |
|||
using System.IO; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Validation; |
|||
|
|||
namespace LINGYUN.Abp.OssManagement |
|||
{ |
|||
public class CreateOssObjectInput |
|||
{ |
|||
public string Bucket { get; set; } |
|||
public string Path { get; set; } |
|||
public string Object { get; set; } |
|||
public bool Overwrite { get; set; } |
|||
|
|||
[DisableAuditing] |
|||
[DisableValidation] |
|||
public Stream Content { get; set; } |
|||
public TimeSpan? ExpirationTime { get; set; } |
|||
|
|||
public void SetContent(Stream content) |
|||
{ |
|||
Content = content; |
|||
Content?.Seek(0, SeekOrigin.Begin); |
|||
} |
|||
} |
|||
} |
|||
using System; |
|||
using System.IO; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Content; |
|||
using Volo.Abp.Validation; |
|||
|
|||
namespace LINGYUN.Abp.OssManagement |
|||
{ |
|||
public class CreateOssObjectInput |
|||
{ |
|||
public string Bucket { get; set; } |
|||
public string Path { get; set; } |
|||
public string FileName { get; set; } |
|||
public bool Overwrite { get; set; } |
|||
|
|||
[DisableAuditing] |
|||
[DisableValidation] |
|||
public IRemoteStreamContent File { get; set; } |
|||
|
|||
public TimeSpan? ExpirationTime { get; set; } |
|||
|
|||
public void SetContent(Stream content) |
|||
{ |
|||
content.Seek(0, SeekOrigin.Begin); |
|||
File = new RemoteStreamContent(content); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,11 @@ |
|||
using System.IO; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace LINGYUN.Abp.OssManagement |
|||
{ |
|||
public interface IStaticFilesAppService: IApplicationService |
|||
{ |
|||
Task<Stream> GetAsync(GetStaticFileInput input); |
|||
} |
|||
} |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Content; |
|||
|
|||
namespace LINGYUN.Abp.OssManagement |
|||
{ |
|||
public interface IStaticFilesAppService: IApplicationService |
|||
{ |
|||
Task<IRemoteStreamContent> GetAsync(GetStaticFileInput input); |
|||
} |
|||
} |
|||
|
|||
@ -1,37 +0,0 @@ |
|||
using Microsoft.AspNetCore.Http; |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace LINGYUN.Abp.OssManagement |
|||
{ |
|||
public class UploadOssObjectInput : UploadFile |
|||
{ |
|||
public string Bucket { get; set; } |
|||
public string Path { get; set; } |
|||
|
|||
#region 配合Uplaoder 分块传输
|
|||
/// <summary>
|
|||
/// 常规块大小
|
|||
/// </summary>
|
|||
[Required] |
|||
public long ChunkSize { get; set; } |
|||
/// <summary>
|
|||
/// 当前块大小
|
|||
/// </summary>
|
|||
[Required] |
|||
public long CurrentChunkSize { get; set; } |
|||
/// <summary>
|
|||
/// 当前上传中块的索引
|
|||
/// </summary>
|
|||
[Required] |
|||
public int ChunkNumber { get; set; } |
|||
/// <summary>
|
|||
/// 块总数
|
|||
/// </summary>
|
|||
[Required] |
|||
public int TotalChunks { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
public IFormFile File { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue