From 265ae0ac8b690b5d6f5129c049ea56309f8feba6 Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 27 Jun 2023 18:51:00 +0900 Subject: [PATCH] =?UTF-8?q?FileDocumentDesc=EB=A5=BC=20public=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/api.go b/core/api.go index 57ee09f..c5356d9 100644 --- a/core/api.go +++ b/core/api.go @@ -26,7 +26,7 @@ import ( "go.mongodb.org/mongo-driver/mongo/options" ) -type fileDocumentDesc struct { +type FileDocumentDesc struct { Service string `bson:"service" json:"service"` Key string `bson:"key" json:"key"` Src string `bson:"src" json:"src"` @@ -37,7 +37,7 @@ type fileDocumentDesc struct { Contents []byte `bson:"contents,omitempty" json:"contents,omitempty"` } -func (fd *fileDocumentDesc) save() error { +func (fd *FileDocumentDesc) save() error { // 새 파일 올라옴 if len(fd.Contents) == 0 { return nil @@ -180,7 +180,7 @@ func (caller apiCaller) uploadAPI(w http.ResponseWriter, r *http.Request) error link = path.Join("static", subfolder, rf, header.Filename) } - newdoc := fileDocumentDesc{ + newdoc := FileDocumentDesc{ Contents: contents, Src: header.Filename, Timestamp: time.Now().UTC().Unix(),