diff --git a/app/controllers/api/ApiNoteController.go b/app/controllers/api/ApiNoteController.go index d251494..1c5ae85 100644 --- a/app/controllers/api/ApiNoteController.go +++ b/app/controllers/api/ApiNoteController.go @@ -166,18 +166,20 @@ func (c ApiNote) fixPostNotecontent(noteOrContent *info.ApiNote) { if file.LocalFileId != "" { LogJ(file) if !file.IsAttach { - reg, _ := regexp.Compile(`"https*://[^/]*?/api/file/getImage\?fileId=`+file.LocalFileId) + // /api/file/getImage?fileId=serverId // noteOrContent.Content = strings.Replace(noteOrContent.Content, // baseUrl + "/api/file/getImage?fileId="+file.LocalFileId, // "/api/file/getImage?fileId="+file.FileId, -1) } else { - reg, _ := regexp.Compile(`"https*://[^/]*?/api/file/getAttach\?fileId=`+file.LocalFileId) + reg, _ := regexp.Compile(`https*://[^/]*?/api/file/getAttach\?fileId=`+file.LocalFileId) Log(reg) - noteOrContent.Content = reg.ReplaceAllString(noteOrContent.Content, `"/api/file/getAttach?fileId=`+file.FileId) + noteOrContent.Content = reg.ReplaceAllString(noteOrContent.Content, `/api/file/getAttach?fileId=`+file.FileId) /* noteOrContent.Content = strings.Replace(noteOrContent.Content, baseUrl + "/api/file/getAttach?fileId="+file.LocalFileId,