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(),