Merge branch 'master' into kd-live
This commit is contained in:
@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user