Search code examples
azureazure-storageazure-blob-storage

Azure blob storage : Is there any way to show custom html page when the SAS token expired for a file?


For one of my project I am uploading file to the Azure Blob Storage by setting expiry date for 1 week via SAS token and sending the URL to the user via email. By default, Azure shows error text in XML format when the link is expired. Is there any way to show some custom html page instead of XML error when the URL is expired?


Solution

  • No, this is currently not possible in Blob Storage. As a workaround, you could route the requests through, for instance, an HTTP-triggered Azure Function. This could check the SAS token and either return the file from Blob or a custom error page.