From 530884855839f29f9b38c986784f86d5a058666b Mon Sep 17 00:00:00 2001 From: Matheus Santos Date: Thu, 5 Jan 2023 12:04:33 +0100 Subject: [PATCH] fix: isRemoteUrl not working on big files sometimes --- lib-es5/utils/isRemoteUrl.js | 2 +- lib/utils/isRemoteUrl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-es5/utils/isRemoteUrl.js b/lib-es5/utils/isRemoteUrl.js index 9f87cd4f..0388feae 100644 --- a/lib-es5/utils/isRemoteUrl.js +++ b/lib-es5/utils/isRemoteUrl.js @@ -8,7 +8,7 @@ var isString = require('lodash/isString'); * @returns {boolean} true if the given url is a remote location or data */ function isRemoteUrl(url) { - return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:([\w-.]+\/[\w-.]+(\+[\w-.]+)?)?(;[\w-.]+=[\w-.]+)*;base64,([a-zA-Z0-9\/+\n=]+)$/.test(url); + return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:/.test(url); } module.exports = isRemoteUrl; \ No newline at end of file diff --git a/lib/utils/isRemoteUrl.js b/lib/utils/isRemoteUrl.js index a82585b6..e1f77cc3 100644 --- a/lib/utils/isRemoteUrl.js +++ b/lib/utils/isRemoteUrl.js @@ -6,7 +6,7 @@ const isString = require('lodash/isString'); * @returns {boolean} true if the given url is a remote location or data */ function isRemoteUrl(url) { - return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:([\w-.]+\/[\w-.]+(\+[\w-.]+)?)?(;[\w-.]+=[\w-.]+)*;base64,([a-zA-Z0-9\/+\n=]+)$/.test(url); + return isString(url) && /^ftp:|^https?:|^gs:|^s3:|^data:/.test(url); } module.exports = isRemoteUrl;