Skip to content

Commit

Permalink
Merge pull request #584 from matheuswanted/fix/isRemoteUrl-breaking
Browse files Browse the repository at this point in the history
fix: isRemoteUrl not working on big files sometimes
  • Loading branch information
cloudinary-pkoniu committed May 2, 2023
2 parents 607afb0 + 5308848 commit 54baa55
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 54baa55

Please sign in to comment.