The picker accepts one MP4 or WebM, the thread lightbox zooms photos, and Discord gets the video as a file on a follow-up message so photo embeds still render.
This commit is contained in:
@@ -295,6 +295,19 @@ func TestPostVideoMultipartLifecycle(t *testing.T) {
|
||||
t.Fatalf("streamed video upload = %+v", streamed)
|
||||
}
|
||||
|
||||
rec = httptest.NewRecorder()
|
||||
req := httptest.NewRequest(http.MethodGet, "/questions/"+root.ID, nil)
|
||||
for _, cookie := range cookies {
|
||||
req.AddCookie(cookie)
|
||||
}
|
||||
handler.ServeHTTP(rec, req)
|
||||
page := rec.Body.String()
|
||||
if rec.Code != http.StatusOK ||
|
||||
!strings.Contains(page, `<video src="`+root.Images[1].PublicURL) ||
|
||||
!strings.Contains(page, `data-existing-video`) {
|
||||
t.Fatalf("question page missing video player: %d %s", rec.Code, page)
|
||||
}
|
||||
|
||||
rec = multipartPost(t, handler, "/posts/"+root.ID+"/edit", map[string][]string{
|
||||
"_csrf": {csrf},
|
||||
"body": {"Keep the clip."},
|
||||
|
||||
Reference in New Issue
Block a user