Skip to content

Commit aa674a2

Browse files
committed
more friendly upload missing torrent error message
1 parent 673181b commit aa674a2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

client/pages/upload.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ const Upload = ({ token, userId }) => {
243243
const form = new FormData(e.target);
244244

245245
try {
246+
if (!torrentFile) throw new Error("No .torrent file added");
247+
246248
const uploadRes = await fetch(`${SQ_API_URL}/torrent/upload`, {
247249
method: "POST",
248250
headers: {

0 commit comments

Comments
 (0)