feat(server) user-defined storage structure (#1098)

[Breaking] newly uploaded file will conform to the default structure of `{uploadLocation}/{userId}/year/year-month-day/filename.ext`
This commit is contained in:
Alex
2022-12-16 14:26:12 -06:00
committed by GitHub
parent 391d00bcb9
commit c754c860fd
59 changed files with 1892 additions and 173 deletions

View File

@@ -11,6 +11,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**getConfig**](SystemConfigApi.md#getconfig) | **GET** /system-config |
[**getDefaults**](SystemConfigApi.md#getdefaults) | **GET** /system-config/defaults |
[**getStorageTemplateOptions**](SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
[**updateConfig**](SystemConfigApi.md#updateconfig) | **PUT** /system-config |
@@ -100,6 +101,49 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getStorageTemplateOptions**
> SystemConfigTemplateStorageOptionDto getStorageTemplateOptions()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = SystemConfigApi();
try {
final result = api_instance.getStorageTemplateOptions();
print(result);
} catch (e) {
print('Exception when calling SystemConfigApi->getStorageTemplateOptions: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**SystemConfigTemplateStorageOptionDto**](SystemConfigTemplateStorageOptionDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateConfig**
> SystemConfigDto updateConfig(systemConfigDto)

View File

@@ -10,6 +10,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ffmpeg** | [**SystemConfigFFmpegDto**](SystemConfigFFmpegDto.md) | |
**oauth** | [**SystemConfigOAuthDto**](SystemConfigOAuthDto.md) | |
**storageTemplate** | [**SystemConfigStorageTemplateDto**](SystemConfigStorageTemplateDto.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,15 @@
# openapi.model.SystemConfigStorageTemplateDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**template** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,21 @@
# openapi.model.SystemConfigTemplateStorageOptionDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**yearOptions** | **List<String>** | | [default to const []]
**monthOptions** | **List<String>** | | [default to const []]
**dayOptions** | **List<String>** | | [default to const []]
**hourOptions** | **List<String>** | | [default to const []]
**minuteOptions** | **List<String>** | | [default to const []]
**secondOptions** | **List<String>** | | [default to const []]
**presetOptions** | **List<String>** | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)