William L
William L

Reputation: 1

Should the client connect directly to Azure Blob Storage

Is it a good idea for the client to communicate directly to Azure Blob Storage? If we do it this way, how will we perform server side validation?

For example. Say I want to use blob storage to manage my uploaded images. But I want to prevent users from uploading certain image types and also files that are larger than 10 mb. How can I implement server side validation for this?

Upvotes: 0

Views: 279

Answers (1)

juunas
juunas

Reputation: 58733

You have to handle the files in your back-end, you cannot allow them to upload the files directly in this case.

So you take the file in, validate it, and then upload it to Storage. And don't give the keys to the client.

Upvotes: 1

Related Questions