Static file upload via optional direct link or multipart form

This commit is contained in:
Bel LaPointe
2020-07-24 12:03:21 -06:00
parent 99fb3bb1c3
commit 0e980b1128
6 changed files with 168 additions and 10 deletions

View File

@@ -117,9 +117,6 @@ func TestBoltDBFind(t *testing.T) {
if o.Title == "" {
t.Error(o.Title)
}
if o.Image == "" {
t.Error(o.Image)
}
if o.Text == "" {
t.Error(o.Text)
}
@@ -380,7 +377,6 @@ func fillBoltDB(t *testing.T, bdb *BoltDB) {
Name: "name-" + uuid.New().String()[:5],
Type: "type-" + uuid.New().String()[:5],
Title: "titl-" + uuid.New().String()[:5],
Image: "imge-" + uuid.New().String()[:5],
Text: "text-" + uuid.New().String()[:5],
Modified: time.Now().UnixNano(),
Connections: map[string]entity.One{p.Name: p},

View File

@@ -14,7 +14,6 @@ const (
Relationship = "relationship"
Type = "type"
Title = "title"
Image = "image"
Text = "text"
Modified = "modified"
Connections = "connections"
@@ -25,7 +24,6 @@ type One struct {
Name string `bson:"_id,omitempty" json:"name,omitempty"`
Type string `bson:"type,omitempty" json:"type,omitempty"`
Title string `bson:"title,omitempty" json:"title,omitempty"`
Image string `bson:"image,omitempty" json:"image,omitempty"`
Text string `bson:"text,omitempty" json:"text,omitempty"`
Relationship string `bson:"relationship,omitempty" json:"relationship,omitempty"`
Modified int64 `bson:"modified,omitempty" json:"modified,omitempty"`

View File

@@ -187,7 +187,6 @@ func randomOne() entity.One {
Name: uuid.New().String()[:5],
Type: "Humman",
Title: "Biggus",
Image: "/path/to.jpg",
Text: "tee hee xd",
Modified: time.Now().UnixNano(),
Connections: map[string]entity.One{},