| @@ -320,6 +320,7 @@ func (m *uploadsOnDisk) DeleteAll() (e error) { | |||
| eFile := os.Remove(m.filePath()) | |||
| ePdf := os.Remove(m.pdfPath()) | |||
| eThumb := os.Remove(m.thumbPath()) | |||
| eJson := os.Remove(m.jsonPath()) | |||
| eMeta := m.Upload.Delete() | |||
| strId := strconv.Itoa(int(m.Upload.Id)) | |||
| @@ -341,6 +342,10 @@ func (m *uploadsOnDisk) DeleteAll() (e error) { | |||
| errMsg += " thumb " | |||
| } | |||
| if eJson != nil { | |||
| errMsg += " json " | |||
| } | |||
| if eMeta != nil { | |||
| errMsg += " Meta in DB " | |||
| e = errors.New(errMsg + " cannot be deleted " + strId) | |||
| @@ -39,3 +39,6 @@ rsync -avh --delete /tmp/sfm_loan_rest_api_dist/ root@c5016.biukop.com.au:/var/s | |||
| # remote update | |||
| ssh root@c5016.biukop.com.au '/usr/local/lib/sfmapi/local_update.sh' | |||
| # remove binary file | |||
| rm -f /home/sp/go/src/SFM_Loan_RestApi/api | |||