add ability to extract zip file contents in File Management

This commit is contained in:
sbwalker
2024-08-14 15:54:13 -04:00
parent 57ef4c0396
commit 1a2ad55677
5 changed files with 95 additions and 7 deletions

View File

@ -75,5 +75,10 @@ namespace Oqtane.Services
{
return await GetByteArrayAsync($"{Apiurl}/download/{fileId}");
}
public async Task UnzipFileAsync(int fileId)
{
await PutAsync($"{Apiurl}/unzip/{fileId}");
}
}
}

View File

@ -92,5 +92,13 @@ namespace Oqtane.Services
/// </param>
/// <returns></returns>
Task<List<File>> GetFilesAsync(int siteId, string folderPath);
/// <summary>
/// Unzips the contents of a zip file
/// </summary>
/// <param name="fileId">Reference to the <see cref="File"/></param>
/// </param>
/// <returns></returns>
Task UnzipFileAsync(int fileId);
}
}

View File

@ -194,7 +194,7 @@ namespace Oqtane.Services
public async Task AddOrUpdateSettingAsync(string entityName, int entityId, string settingName, string settingValue, bool isPrivate)
{
await PutJsonAsync<object>($"{Apiurl}/{entityName}/{entityId}/{settingName}/{settingValue}/{isPrivate}", null);
await PutAsync($"{Apiurl}/{entityName}/{entityId}/{settingName}/{settingValue}/{isPrivate}");
}
public async Task DeleteSettingAsync(string entityName, int entityId, string settingName)