Handling expired Azure Blob Storage links in a user-friendly way

📝 Use case: your app hosts files in Azure Blob Storage and users can generate expiring links to these files (using SAS tokens) 🤕 Problem: when a user opens a link with an expired SAS token, an unfriendly XML is displayed containing a technical error 😊 Solution: proxy the link with SAS token through an endpoint (Azure Function in my case), which will either redirect to the file (if the token is still valid) or show a descriptive error message...

May 26, 2022 · 3 min · 523 words · Michał Żołnieruk