feat: 文件资源统一放到/usr/local/omc
This commit is contained in:
@@ -83,7 +83,7 @@ func (s *NeActionController) PushFile(c *gin.Context) {
|
||||
// 本地文件
|
||||
localFilePath := file.ParseUploadFileAbsPath(body.UploadPath)
|
||||
// 网元端临时目录
|
||||
sshClient.RunCMD("mkdir -p /tmp/omc/push && sudo chmod 777 -R /tmp/omc")
|
||||
sshClient.RunCMD("sudo mkdir -p /tmp/omc/push && sudo chmod 755 -R /tmp/omc")
|
||||
neFilePath := filepath.ToSlash(filepath.Join("/tmp/omc/push", filepath.Base(localFilePath)))
|
||||
// 复制到远程
|
||||
if err = sftpClient.CopyFileLocalToRemote(localFilePath, neFilePath); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user