Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerinax"
name = "azure_storage_service"
version = "4.3.2"
version = "4.3.3"
authors = ["Ballerina"]
export = ["azure_storage_service", "azure_storage_service.files", "azure_storage_service.blobs"]
keywords = ["Content & Files/File Management & Storage", "Cost/Paid", "Vendor/Microsoft"]
Expand Down
67 changes: 46 additions & 21 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.8.6"
distribution-version = "2201.12.8"

[[package]]
org = "ballerina"
name = "auth"
version = "2.10.0"
version = "2.14.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -22,7 +22,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.8.0"
version = "3.10.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -33,15 +33,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.6.3"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -50,10 +50,19 @@ modules = [
{org = "ballerina", packageName = "crypto", moduleName = "crypto"}
]

[[package]]
org = "ballerina"
name = "data.jsondata"
version = "1.1.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.object"}
]

[[package]]
org = "ballerina"
name = "file"
version = "1.9.0"
version = "1.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -67,12 +76,13 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.21"
version = "2.14.4"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "data.jsondata"},
{org = "ballerina", name = "file"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -99,7 +109,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.3"
version = "1.8.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -119,10 +129,11 @@ modules = [
[[package]]
org = "ballerina"
name = "jwt"
version = "2.10.0"
version = "2.15.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "lang.string"},
Expand Down Expand Up @@ -230,7 +241,7 @@ modules = [
[[package]]
org = "ballerina"
name = "log"
version = "2.9.0"
version = "2.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -244,17 +255,18 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.9.0"
version = "2.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"}
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "log"}
]

[[package]]
org = "ballerina"
name = "oauth2"
version = "2.10.0"
version = "2.14.1"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand All @@ -267,15 +279,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.2.3"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.8.0"
version = "1.10.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -299,10 +311,11 @@ modules = [
[[package]]
org = "ballerina"
name = "task"
version = "2.5.0"
version = "2.11.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
{org = "ballerina", name = "time"},
{org = "ballerina", name = "uuid"}
]

[[package]]
Expand All @@ -312,6 +325,7 @@ version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.error"}
]
modules = [
Expand All @@ -321,7 +335,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.5.0"
version = "2.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -332,15 +346,26 @@ modules = [
[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "uuid"
version = "1.10.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "xmldata"
version = "2.7.1"
version = "2.9.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -351,7 +376,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "azure_storage_service"
version = "4.3.2"
version = "4.3.3"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand Down
30 changes: 19 additions & 11 deletions ballerina/modules/files/file_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -129,7 +129,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -184,7 +184,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->put(requestPath, request);
check checkAndHandleErrors(response);
Expand Down Expand Up @@ -219,7 +219,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->delete(requestPath, request);
check checkAndHandleErrors(response);
Expand Down Expand Up @@ -278,7 +278,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -336,7 +336,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -381,7 +381,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->delete(requestPath, request);
check checkAndHandleErrors(response);
Expand Down Expand Up @@ -416,7 +416,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -460,7 +460,7 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -495,7 +495,11 @@ public isolated client class FileClient {
: (SLASH + fileShareName + SLASH + destDirectoryPath + SLASH + destFileName);
string sourcePath = sourceURL;
if (self.azureConfig.authorizationMethod == SAS) {
sourcePath = sourceURL + self.azureConfig.accessKeyOrSAS;
if sourceURL.includes(QUESTION_MARK) {
sourcePath = sourceURL.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
} else {
sourcePath = sourceURL.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS);
}
}
http:Request request = new;
map<string> requiredSpecificHeaderes = {[X_MS_COPY_SOURCE] : sourcePath};
Expand All @@ -513,7 +517,11 @@ public isolated client class FileClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(self.azureConfig.accessKeyOrSAS);
if requestPath.includes(QUESTION_MARK) {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
} else {
requestPath = requestPath.concat(QUESTION_MARK, self.azureConfig.accessKeyOrSAS);
}
}
http:Response response = check self.httpClient->put(requestPath, request);
check checkAndHandleErrors(response);
Expand Down
12 changes: 6 additions & 6 deletions ballerina/modules/files/management_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
getListPath = getListPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
getListPath = getListPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(getListPath, headerMap);
Expand Down Expand Up @@ -103,7 +103,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
getListPath = getListPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
getListPath = getListPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(getListPath, headerMap);
Expand Down Expand Up @@ -144,7 +144,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->put(requestPath, request);
check checkAndHandleErrors(response);
Expand Down Expand Up @@ -177,7 +177,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->put(requestPath, request);
check checkAndHandleErrors(response);
Expand Down Expand Up @@ -205,7 +205,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
map<string> headerMap = populateHeaderMapFromRequest(request);
http:Response response = check self.httpClient->get(requestPath, headerMap);
Expand Down Expand Up @@ -241,7 +241,7 @@ public isolated client class ManagementClient {
};
check prepareAuthorizationHeaders(authorizationDetail);
} else {
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS.substring(1));
requestPath = requestPath.concat(AMPERSAND, self.azureConfig.accessKeyOrSAS);
}
http:Response response = check self.httpClient->delete(requestPath, request);
check checkAndHandleErrors(response);
Expand Down
Loading
Loading