Skip to content

Commit

Permalink
fix: isRemoteUrl not working on big files sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus Santos committed Jan 5, 2023
1 parent 1255763 commit 5308848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib-es5/utils/isRemoteUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion lib/utils/isRemoteUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 5308848

Please sign in to comment.