You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the fresh installation of my app, the first time when I call downloadToFile method completion block not called. It won't give error nor a failure. Downloading goes to infinity. After restarting app then onwards it will work all the time.
If I use downloadToText and it works all the time. downloadToFile not working the first time. I have to download the ZIP file so I have to always go for downloadToFile method.
Have you found a mitigation/solution?
No, I have tried to download one dummy file on the app launch but still, downloadToFile method completion block won't be called.
Code:
func sampleBlobDownload() {
do {
// Create a storage account object from a connection string.
let connectionString = String(format: "DefaultEndpointsProtocol=https;AccountName=%@;AccountKey=%@", kBlobAccountName, kAccountKey)
let account = try AZSCloudStorageAccount(fromConnectionString: connectionString)
// Create a blob service client object.
let blobClient = account.getBlobClient()
// Create a local container object.
let blobContainer = blobClient.containerReference(fromName: kBlobAccountName)
// Create container in your Storage account if the container doesn't already exist
blobContainer.createContainerIfNotExists(with: .container, requestOptions: nil, operationContext: nil, completionHandler: { error, _ in
if error != nil {
print("Error in creating container.")
} else {
//Create a local blob object=
let docDir = MasterDownloader.shared.getDocumentDirectoryPath()
let destinationURL = docDir.appendingPathComponent("abc.txt")
let blockBlob = blobContainer.blockBlobReference(fromName: "abc.txt")
blockBlob.downloadToFile(with: destinationURL, append: true) { (error) in
if error != nil {
print("Error in downloading from blob")
} else {
print("Downloaded")
}
}
// Download To text function works all time but donwloadToFile not work first time.
// let blockBlob = blobContainer.blockBlobReference(fromName: "abc")
// blockBlob.downloadToText { (error, text) in
// if error != nil {
// print("Error in uploading to blob")
// } else {
// print(text)
// }
// }
}
})
} catch let error {
print(error)
}
}
The text was updated successfully, but these errors were encountered:
Which version of the SDK/iOS was used?
pod 'AZSClient', '~> 0.2.6'
What problem was encountered?
After the fresh installation of my app, the first time when I call downloadToFile method completion block not called. It won't give error nor a failure. Downloading goes to infinity. After restarting app then onwards it will work all the time.
If I use downloadToText and it works all the time. downloadToFile not working the first time. I have to download the ZIP file so I have to always go for downloadToFile method.
Have you found a mitigation/solution?
No, I have tried to download one dummy file on the app launch but still, downloadToFile method completion block won't be called.
Code:
The text was updated successfully, but these errors were encountered: