mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Greenfield: Add image upload for app items (#6226)
Upload endpoints for app item images. Follow-up to #6075. Tested to work with the app item editor. Uses UploadImage consistently in API and UI.
This commit is contained in:
@@ -1179,6 +1179,17 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
HandleActionResult(await GetController<GreenfieldAppsController>().DeleteApp(appId));
|
||||
}
|
||||
|
||||
public override async Task<FileData> UploadAppItemImage(string appId, string filePath, string mimeType, CancellationToken token = default)
|
||||
{
|
||||
var file = GetFormFile(filePath, mimeType);
|
||||
return GetFromActionResult<FileData>(await GetController<GreenfieldAppsController>().UploadAppItemImage(appId, file));
|
||||
}
|
||||
|
||||
public override async Task DeleteAppItemImage(string appId, string fileId, CancellationToken token = default)
|
||||
{
|
||||
HandleActionResult(await GetController<GreenfieldAppsController>().DeleteAppItemImage(appId, fileId));
|
||||
}
|
||||
|
||||
public override Task<List<RateSource>> GetRateSources(CancellationToken token = default)
|
||||
{
|
||||
return Task.FromResult(GetFromActionResult(GetController<GreenfieldStoreRateConfigurationController>().GetRateSources()));
|
||||
|
||||
Reference in New Issue
Block a user