17 changed files with 167 additions and 338 deletions
@ -1,26 +1,28 @@ |
|||||
using System; |
using System; |
||||
using System.IO; |
using System.IO; |
||||
using Volo.Abp.Auditing; |
using Volo.Abp.Auditing; |
||||
using Volo.Abp.Validation; |
using Volo.Abp.Content; |
||||
|
using Volo.Abp.Validation; |
||||
namespace LINGYUN.Abp.OssManagement |
|
||||
{ |
namespace LINGYUN.Abp.OssManagement |
||||
public class CreateOssObjectInput |
{ |
||||
{ |
public class CreateOssObjectInput |
||||
public string Bucket { get; set; } |
{ |
||||
public string Path { get; set; } |
public string Bucket { get; set; } |
||||
public string Object { get; set; } |
public string Path { get; set; } |
||||
public bool Overwrite { get; set; } |
public string FileName { get; set; } |
||||
|
public bool Overwrite { get; set; } |
||||
[DisableAuditing] |
|
||||
[DisableValidation] |
[DisableAuditing] |
||||
public Stream Content { get; set; } |
[DisableValidation] |
||||
public TimeSpan? ExpirationTime { get; set; } |
public IRemoteStreamContent File { get; set; } |
||||
|
|
||||
public void SetContent(Stream content) |
public TimeSpan? ExpirationTime { get; set; } |
||||
{ |
|
||||
Content = content; |
public void SetContent(Stream content) |
||||
Content?.Seek(0, SeekOrigin.Begin); |
{ |
||||
} |
content.Seek(0, SeekOrigin.Begin); |
||||
} |
File = new RemoteStreamContent(content); |
||||
} |
} |
||||
|
} |
||||
|
} |
||||
|
|||||
@ -1,11 +1,11 @@ |
|||||
using System.IO; |
using System.Threading.Tasks; |
||||
using System.Threading.Tasks; |
using Volo.Abp.Application.Services; |
||||
using Volo.Abp.Application.Services; |
using Volo.Abp.Content; |
||||
|
|
||||
namespace LINGYUN.Abp.OssManagement |
namespace LINGYUN.Abp.OssManagement |
||||
{ |
{ |
||||
public interface IStaticFilesAppService: IApplicationService |
public interface IStaticFilesAppService: IApplicationService |
||||
{ |
{ |
||||
Task<Stream> GetAsync(GetStaticFileInput input); |
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