mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-02 12:10:05 +08:00
F upload file
This commit is contained in:
parent
2327c22c8d
commit
1102e7e272
@ -272,7 +272,7 @@ func (Server) Report(gp *core.Goploy) core.Response {
|
||||
}
|
||||
logType, err := strconv.Atoi(gp.URLQuery.Get("type"))
|
||||
if err != nil {
|
||||
return response.JSON{Code: response.Error, Message: "invalid server id"}
|
||||
return response.JSON{Code: response.Error, Message: "invalid log type"}
|
||||
}
|
||||
datetimeRange := strings.Split(gp.URLQuery.Get("datetimeRange"), ",")
|
||||
if len(datetimeRange) != 2 {
|
||||
|
@ -56,7 +56,7 @@
|
||||
<el-upload
|
||||
ref="upload"
|
||||
style="margin: 0 12px"
|
||||
:action="`${formProps.action}?projectFileId=${file.id}&projectId=${file.projectId}&filename=${file.filename}`"
|
||||
:action="`${formProps.action}&projectFileId=${file.id}&projectId=${file.projectId}&filename=${file.filename}`"
|
||||
:before-upload="(uploadFile) => beforeUpload(uploadFile, index)"
|
||||
:on-success="
|
||||
(response, uploadFile, uploadFileList) =>
|
||||
@ -132,6 +132,7 @@ import { VAceEditor } from 'vue3-ace-editor'
|
||||
import { role } from '@/utils/namespace'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import { computed, watch, defineComponent, reactive } from 'vue'
|
||||
import { NamespaceKey, getNamespaceId } from '@/utils/namespace'
|
||||
import { HttpResponse, ID } from '@/api/types'
|
||||
|
||||
interface FormFileInfo {
|
||||
@ -196,7 +197,9 @@ export default defineComponent({
|
||||
return {
|
||||
formProps: {
|
||||
projectPath: '${PROJECT_PATH}',
|
||||
action: import.meta.env.VITE_APP_BASE_API + '/project/uploadFile',
|
||||
action: `${
|
||||
import.meta.env.VITE_APP_BASE_API
|
||||
}/project/uploadFile?${NamespaceKey}=${getNamespaceId()}`,
|
||||
show: 'file-list',
|
||||
editContentLoading: false,
|
||||
disabled: false,
|
||||
|
Loading…
Reference in New Issue
Block a user