|
@ -295,6 +295,7 @@ func generateBarename() string { |
|
|
func generateJSONresponse(upload Upload, r *http.Request) []byte { |
|
|
func generateJSONresponse(upload Upload, r *http.Request) []byte { |
|
|
js, _ := json.Marshal(map[string]string{ |
|
|
js, _ := json.Marshal(map[string]string{ |
|
|
"url": getSiteURL(r) + upload.Filename, |
|
|
"url": getSiteURL(r) + upload.Filename, |
|
|
|
|
|
"direct_url": getSiteURL(r) + Config.selifPath + upload.Filename, |
|
|
"filename": upload.Filename, |
|
|
"filename": upload.Filename, |
|
|
"delete_key": upload.Metadata.DeleteKey, |
|
|
"delete_key": upload.Metadata.DeleteKey, |
|
|
"expiry": strconv.FormatInt(upload.Metadata.Expiry.Unix(), 10), |
|
|
"expiry": strconv.FormatInt(upload.Metadata.Expiry.Unix(), 10), |
|
|