Azure blob storage gen2

Chandru Sati 20 Reputation points
2024-04-26T10:54:48.57+00:00

I need to restrict uploading files to Blob storage at 18 MB size and allow only .txt extension

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,350 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sumarigo-MSFT 43,801 Reputation points Microsoft Employee
    2024-04-26T14:03:47.56+00:00

    @Chandru Sati Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    What's the authorization mechanism that clients use? Attribute-based access control (ABAC) could be used to restrict uploads to .txt files: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-auth-abac. However, content length is not a supported attribute for ABAC conditions.

    Please let us know if you have any further queries. I’m happy to assist you further.   


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Marcin Policht 11,470 Reputation points MVP
    2024-04-26T11:07:20.7466667+00:00

    In short, these options are not supported on the service side. You'd need to enforce this on the side where the upload takes place


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Amrinder Singh 2,195 Reputation points Microsoft Employee
    2024-04-26T12:02:09.99+00:00

    Hi Chandru Sati - Thanks for reaching out over Q&A Forum.

    There isn't an option on the Storage side to restrict the upload based on file size or extension and need to be controlled from the application side itself.

    0 comments No comments