feat(workflow): import files from external storage
This commit is contained in:
@@ -34,6 +34,23 @@ func CreateArchive(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// ImportFiles imports files
|
||||
func ImportFiles(c *gin.Context) {
|
||||
service := ParametersFromContext[*explorer.ImportWorkflowService](c, explorer.CreateImportParamCtx{})
|
||||
resp, err := service.CreateImportTask(c)
|
||||
if err != nil {
|
||||
c.JSON(200, serializer.Err(c, err))
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
if resp != nil {
|
||||
c.JSON(200, serializer.Response{
|
||||
Data: resp,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// CreateRemoteDownload creates remote download task
|
||||
func CreateRemoteDownload(c *gin.Context) {
|
||||
service := ParametersFromContext[*explorer.DownloadWorkflowService](c, explorer.CreateDownloadParamCtx{})
|
||||
|
||||
Reference in New Issue
Block a user