diff --git a/src/email/email.go b/src/email/email.go index 7021f89..5a71a2d 100644 --- a/src/email/email.go +++ b/src/email/email.go @@ -96,12 +96,12 @@ type TimeMachineEmailData struct { Username string UserEmail string DiscordUsername string - MediaUrl string + MediaUrls []string DeviceInfo string Description string } -func SendTimeMachineEmail(profileUrl, username, userEmail, discordUsername, mediaUrl, deviceInfo, description string, perf *perf.RequestPerf) error { +func SendTimeMachineEmail(profileUrl, username, userEmail, discordUsername string, mediaUrls []string, deviceInfo, description string, perf *perf.RequestPerf) error { perf.StartBlock("EMAIL", "Time machine email") defer perf.EndBlock() @@ -110,7 +110,7 @@ func SendTimeMachineEmail(profileUrl, username, userEmail, discordUsername, medi Username: username, UserEmail: userEmail, DiscordUsername: discordUsername, - MediaUrl: mediaUrl, + MediaUrls: mediaUrls, DeviceInfo: deviceInfo, Description: description, }) diff --git a/src/templates/src/email_time_machine.html b/src/templates/src/email_time_machine.html index 6bd6e08..92178ca 100644 --- a/src/templates/src/email_time_machine.html +++ b/src/templates/src/email_time_machine.html @@ -1,5 +1,10 @@

Submission by {{ .Username }} ({{ .UserEmail }}) {{ if .DiscordUsername }} On Discord: {{ .DiscordUsername }} {{ end }}

-

Submitted url: {{ .MediaUrl }}

+

Submitted urls:

+

Device info:
{{ .DeviceInfo }}
Description:
diff --git a/src/templates/src/timemachine_submit.html b/src/templates/src/timemachine_submit.html index d6c7f9a..f1fa505 100644 --- a/src/templates/src/timemachine_submit.html +++ b/src/templates/src/timemachine_submit.html @@ -20,16 +20,21 @@
- Video URL - + Video URLs +
+ +
+
+ + Add video +

- Take video of yourself using an old device. The video should: + Take videos of yourself using an old device. The videos should:

- Upload the video somewhere publicly accessible, then share the link here. We can download videos from file-sharing services or any video service supported by youtube-dl. See licensing terms. + Upload the videos somewhere publicly accessible, then share the link here. We can download videos from file-sharing services or any video service supported by youtube-dl. See licensing terms. +

+

+ If you have a comparable modern device, feel free to submit video of that as well!

+
+

By submitting this form, you are granting us permission to:

  • Download copies of any submitted videos
  • @@ -88,13 +98,17 @@
{{ end }} diff --git a/src/website/time_machine.go b/src/website/time_machine.go index 8be5533..a24676c 100644 --- a/src/website/time_machine.go +++ b/src/website/time_machine.go @@ -98,10 +98,14 @@ func TimeMachineForm(c *RequestContext) ResponseData { func TimeMachineFormSubmit(c *RequestContext) ResponseData { c.Req.ParseForm() - mediaUrl := strings.TrimSpace(c.Req.Form.Get("media_url")) + mediaUrls := c.Req.Form["media_url"] deviceInfo := strings.TrimSpace(c.Req.Form.Get("device_info")) description := strings.TrimSpace(c.Req.Form.Get("description")) + for i := range mediaUrls { + mediaUrls[i] = strings.TrimSpace(mediaUrls[i]) + } + discordUsername := "" if c.CurrentUser.DiscordUser != nil { discordUsername = c.CurrentUser.DiscordUser.Username @@ -111,7 +115,7 @@ func TimeMachineFormSubmit(c *RequestContext) ResponseData { c.CurrentUser.BestName(), c.CurrentUser.Email, discordUsername, - mediaUrl, + mediaUrls, deviceInfo, description, c.Perf,