|
|
@@ -238,18 +238,13 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
/**
|
|
|
*
|
|
|
* @summary 上传文件
|
|
|
- * @param {string} path
|
|
|
* @param {Blob} [file]
|
|
|
+ * @param {string} [path]
|
|
|
* @param {*} [options] Override http request option.
|
|
|
* @throws {RequiredError}
|
|
|
*/
|
|
|
- apiSysFileUploadFilePathPostForm: async (path: string, file?: Blob, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
|
- // verify required parameter 'path' is not null or undefined
|
|
|
- if (path === null || path === undefined) {
|
|
|
- throw new RequiredError('path','Required parameter path was null or undefined when calling apiSysFileUploadFilePathPostForm.');
|
|
|
- }
|
|
|
- const localVarPath = `/api/sysFile/uploadFile/{path}`
|
|
|
- .replace(`{${"path"}}`, encodeURIComponent(String(path)));
|
|
|
+ apiSysFileUploadFilePostForm: async (file?: Blob, path?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
|
+ const localVarPath = `/api/sysFile/uploadFile`;
|
|
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
|
let baseOptions;
|
|
|
@@ -263,6 +258,10 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
|
|
|
// authentication Bearer required
|
|
|
|
|
|
+ if (path !== undefined) {
|
|
|
+ localVarQueryParameter['path'] = path;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (file !== undefined) {
|
|
|
localVarFormParams.append('file', file as any);
|
|
|
@@ -452,13 +451,13 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
|
|
/**
|
|
|
*
|
|
|
* @summary 上传文件
|
|
|
- * @param {string} path
|
|
|
* @param {Blob} [file]
|
|
|
+ * @param {string} [path]
|
|
|
* @param {*} [options] Override http request option.
|
|
|
* @throws {RequiredError}
|
|
|
*/
|
|
|
- async apiSysFileUploadFilePathPostForm(path: string, file?: Blob, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultFileOutput>>> {
|
|
|
- const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileUploadFilePathPostForm(path, file, options);
|
|
|
+ async apiSysFileUploadFilePostForm(file?: Blob, path?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultFileOutput>>> {
|
|
|
+ const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileUploadFilePostForm(file, path, options);
|
|
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
|
return axios.request(axiosRequestArgs);
|
|
|
@@ -551,13 +550,13 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
|
|
/**
|
|
|
*
|
|
|
* @summary 上传文件
|
|
|
- * @param {string} path
|
|
|
* @param {Blob} [file]
|
|
|
+ * @param {string} [path]
|
|
|
* @param {*} [options] Override http request option.
|
|
|
* @throws {RequiredError}
|
|
|
*/
|
|
|
- async apiSysFileUploadFilePathPostForm(path: string, file?: Blob, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultFileOutput>> {
|
|
|
- return SysFileApiFp(configuration).apiSysFileUploadFilePathPostForm(path, file, options).then((request) => request(axios, basePath));
|
|
|
+ async apiSysFileUploadFilePostForm(file?: Blob, path?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultFileOutput>> {
|
|
|
+ return SysFileApiFp(configuration).apiSysFileUploadFilePostForm(file, path, options).then((request) => request(axios, basePath));
|
|
|
},
|
|
|
/**
|
|
|
*
|
|
|
@@ -643,14 +642,14 @@ export class SysFileApi extends BaseAPI {
|
|
|
/**
|
|
|
*
|
|
|
* @summary 上传文件
|
|
|
- * @param {string} path
|
|
|
* @param {Blob} [file]
|
|
|
+ * @param {string} [path]
|
|
|
* @param {*} [options] Override http request option.
|
|
|
* @throws {RequiredError}
|
|
|
* @memberof SysFileApi
|
|
|
*/
|
|
|
- public async apiSysFileUploadFilePathPostForm(path: string, file?: Blob, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultFileOutput>> {
|
|
|
- return SysFileApiFp(this.configuration).apiSysFileUploadFilePathPostForm(path, file, options).then((request) => request(this.axios, this.basePath));
|
|
|
+ public async apiSysFileUploadFilePostForm(file?: Blob, path?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultFileOutput>> {
|
|
|
+ return SysFileApiFp(this.configuration).apiSysFileUploadFilePostForm(file, path, options).then((request) => request(this.axios, this.basePath));
|
|
|
}
|
|
|
/**
|
|
|
*
|