upload-video.ejs

1<!doctype html>
2<html lang="en">
3	<head>
4		<meta charset="UTF-8" />
5		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6		<title><%= title %></title>
7		<link
8			href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
9			rel="stylesheet"
10			integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
11			crossorigin="anonymous"
12		/>
13		<script
14			src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
15			integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
16			crossorigin="anonymous"
17		></script>
18		<script
19			src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"
20			integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
21			crossorigin="anonymous"
22		></script>
23	</head>
24	<body>
25		<%- include('_partials/header') %>
26		<div class="container">
27			<div class="row">
28				<div class="col-md-6 offset-md-3">
29					<h1 class="text-center">Upload</h1>
30
31					<% if (error != null) { %>
32					<div class="alert alert-danger" role="alert"><%= error %></div>
33					<% } %>
34
35					<div class="alert alert-warning" role="alert">
36						You can only upload videos in the following formats: MP4, WebM, and
37						MOV.
38					</div>
39
40					<form
41						action="/upload-video"
42						method="post"
43						enctype="multipart/form-data"
44					>
45						<div class="mb-3">
46							<label for="caption" class="form-label">Caption</label>
47							<input
48								type="text"
49								class="form-control"
50								id="caption"
51								name="caption"
52								required
53							/>
54						</div>
55						<div class="mb-3">
56							<label for="video" class="form-label">Video</label>
57							<input
58								type="file"
59								class="form-control"
60								id="video"
61								name="video"
62								required
63								accept="video/mp4, video/webm, video/mov"
64							/>
65						</div>
66
67						<a href="/upload/image" class="btn btn-secondary">Upload Image</a>
68						<button type="submit" class="btn btn-primary">Upload</button>
69					</form>
70				</div>
71			</div>
72		</div>
73	</body>
74</html>
75