Allow custom download URL (for streaming, etc)

This commit is contained in:
Sam Potts
2018-10-24 22:31:35 +11:00
parent ebaded66b4
commit 03c9b53232
5 changed files with 29 additions and 12 deletions

View File

@ -31,6 +31,11 @@ const isUrl = input => {
return true;
}
// Must be string from here
if (!isString(input)) {
return false;
}
// Add the protocol if required
let string = input;
if (!input.startsWith('http://') || !input.startsWith('https://')) {