using Dlhis.Common.FileOperation.Request;
using Dlhis.Common.FileOperation.Response;
using Dlhis.Common.FileOperation.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Asn1.Ocsp;
namespace Dlhis.Common.FileOperation.Controllers;
///
/// APK文件操作
///
[Obsolete("作废重写")]
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ApkFileController : ControllerBase
{
private readonly IApkFIileService _apkFIileService;
public ApkFileController(IApkFIileService apkFIileService)
{
_apkFIileService = apkFIileService;
}
///
/// minlo文件上传
///
///
///
[HttpPost("minio")]
[RequestSizeLimit(300_000_000)]
public async Task FormSingleFileUpload([FromForm] ApkRequest request)
{
return await _apkFIileService.FormSingleFileUpload(request);
}
///
/// minlo文件下载
///
///
///
[HttpGet("url")]
public async Task RequestDownloadFile(string fileName)
{
return await _apkFIileService.RequestDownloadFile(fileName);
}
///
/// 获取最新版本
///
///
///
[HttpGet("lastversion")]
public async Task GetLastVersionAsync(string productCode)
{
return await _apkFIileService.GetLastVersionAsync(productCode);
}
}