Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit 4cb378e

Browse files
author
Amir Tocker
committed
Version 2.1.8
1 parent 3101e39 commit 4cb378e

5 files changed

+40
-24
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudinary-jquery-file-upload",
3-
"version": "2.1.7",
3+
"version": "2.1.8",
44
"homepage": "http://cloudinary.com",
55
"authors": [
66
{

cloudinary-jquery-file-upload.js

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* Cloudinary's JavaScript library - Version 2.1.7
3+
* Cloudinary's JavaScript library - Version 2.1.8
44
* Copyright Cloudinary
55
* see https://github.com/cloudinary/cloudinary_js
66
*
@@ -342,7 +342,7 @@ var slice = [].slice,
342342
/**
343343
* @class Util
344344
*/
345-
Util = $.extend(BaseUtil, {
345+
Util = jQuery.extend(BaseUtil, {
346346
hasClass: hasClass,
347347
addClass: addClass,
348348
getAttribute: getAttribute,
@@ -1469,22 +1469,38 @@ var slice = [].slice,
14691469
*/
14701470

14711471
Configuration.prototype.fromEnvironment = function() {
1472-
var cloudinary_url, k, ref1, ref2, uri, v;
1472+
var cloudinary_url, j, k, len, query, ref1, ref2, ref3, uri, uriRegex, v, value;
14731473
cloudinary_url = typeof process !== "undefined" && process !== null ? (ref1 = process.env) != null ? ref1.CLOUDINARY_URL : void 0 : void 0;
14741474
if (cloudinary_url != null) {
1475-
uri = require('url').parse(cloudinary_url, true);
1476-
this.configuration = {
1477-
cloud_name: uri.host,
1478-
api_key: uri.auth && uri.auth.split(":")[0],
1479-
api_secret: uri.auth && uri.auth.split(":")[1],
1480-
private_cdn: uri.pathname != null,
1481-
secure_distribution: uri.pathname && uri.pathname.substring(1)
1482-
};
1483-
if (uri.query != null) {
1484-
ref2 = uri.query;
1485-
for (k in ref2) {
1486-
v = ref2[k];
1487-
this.configuration[k] = v;
1475+
uriRegex = /cloudinary:\/\/(?:(\w+)(?:\:(\w+))?@)?([\w\.-]+)(?:\/([^?]*))?(?:\?(.+))?/;
1476+
uri = uriRegex.exec(cloudinary_url);
1477+
if (uri) {
1478+
if (uri[3] != null) {
1479+
this.configuration['cloud_name'] = uri[3];
1480+
}
1481+
if (uri[1] != null) {
1482+
this.configuration['api_key'] = uri[1];
1483+
}
1484+
if (uri[2] != null) {
1485+
this.configuration['api_secret'] = uri[2];
1486+
}
1487+
if (uri[4] != null) {
1488+
this.configuration['private_cdn'] = uri[4] != null;
1489+
}
1490+
if (uri[4] != null) {
1491+
this.configuration['secure_distribution'] = uri[4];
1492+
}
1493+
query = uri[5];
1494+
if (query != null) {
1495+
ref2 = query.split('&');
1496+
for (j = 0, len = ref2.length; j < len; j++) {
1497+
value = ref2[j];
1498+
ref3 = value.split('='), k = ref3[0], v = ref3[1];
1499+
if (v == null) {
1500+
v = true;
1501+
}
1502+
this.configuration[k] = v;
1503+
}
14881504
}
14891505
}
14901506
}
@@ -2897,7 +2913,7 @@ var slice = [].slice,
28972913
Cloudinary = (function() {
28982914
var AKAMAI_SHARED_CDN, CF_SHARED_CDN, DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, OLD_AKAMAI_SHARED_CDN, SHARED_CDN, VERSION, absolutize, applyBreakpoints, cdnSubdomainNumber, closestAbove, cloudinaryUrlPrefix, defaultBreakpoints, finalizeResourceType, findContainerWidth, maxWidth, updateDpr;
28992915

2900-
VERSION = "2.1.7";
2916+
VERSION = "2.1.8";
29012917

29022918
CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net";
29032919

@@ -4132,7 +4148,7 @@ var slice = [].slice,
41324148
TextLayer: TextLayer,
41334149
SubtitlesLayer: SubtitlesLayer,
41344150
Cloudinary: Cloudinary,
4135-
VERSION: "2.1.7",
4151+
VERSION: "2.1.8",
41364152
CloudinaryJQuery: CloudinaryJQuery
41374153
};
41384154
return cloudinary;

cloudinary-jquery-file-upload.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-jquery-file-upload.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudinary-jquery-file-upload",
3-
"version": "2.1.7",
3+
"version": "2.1.8",
44
"description": "Cloudinary Client Side JS library. Cloudinary streamlines your web application’s image manipulation needs. Cloudinary's cloud-based servers automate image uploading, resizing, cropping, optimizing, sprite generation and more. Cloudinary's jQuery File Upload plugin allows direct uploading from the browser to the cloud and dynamic cloud-based image transformations and effects.",
55
"main": "cloudinary-jquery-file-upload.js",
66
"files": ["*.js"],

0 commit comments

Comments
 (0)