Custom error messages for Azure
Can you add option overrides for the error messages in Azure, for example when the signature returns 403.
Static text is in v5.0.4 at line 6504 and 6513
getSasFailure = function(reason, getSasXhr) {
log("GET SAS request failed: " + reason, "error");
promise.failure({error: "Problem communicating with local server"}, getSasXhr);
},
determineBlobUrlSuccess = function(blobUrl) {
api.getSasForPutBlobOrBlock.request(getSasId, blobUrl).then(
getSasSuccess,
getSasFailure
);
},
determineBlobUrlFailure = function(reason) {
log(qq.format("Failed to determine blob name for ID {} - {}", id, reason), "error");
:+1: was also looking for this feature.
Another example:
function handleFailure(xhr, promise) {
var azureError = qq.azure.util.parseAzureError(xhr.responseText, log),
errorMsg = "Problem sending file to Azure";
promise.failure({error: errorMsg,
azureError: azureError && azureError.message,
reset: xhr.status === 403
});
}
Semi-related question: is this supposed to trigger the callback onError? We're attached a logger and it's not logging anything. :) If not, how do I hook in to this?
It should triggger onError. But you should also (and more properly) be able to access the status of the request in an onComplete callback. If you are seeing a specific issue, please open up a new case.
Is there any plan to complete this item?
There is no specific timeline to complete this. Reasons:
- Azure is much less popular than S3 or traditional endpoint support. The S3 and traditional/custom endpoint modules of the code are given priority attention
- I am the only developer allocated to Fine Uploader, and my time to work on this project is unfortunately quite limited as well. I spend most of my time answering questions and providing support.
No problem, I just wanted to know. :) Thanks for your quick reply. We've been using FineUploader for about a year now for transfers of 250-1000 MB datasets, and it's working out great; we're very content. Not being able to customize an error message is only a minor annoyance. We might open a PR for it ourselves at some point.
Thanks for that. I'm working on a plan to get more eyes on Fine Uploader and Modern Uploader.