I was looking at the latest documetation here:
Azure Cosmos DB Service Quotas
And noticed, the part mentioning that Attachments for Cosmos DB is being depreciated. Do you have some guidance/guides on what to do with attachments? Do we put in blob storage, how would we do that in connection with Cosmos DB and user permissions?
or is there another (new) feature other than how attachments has worked in the past?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@HUBBER12 Could you please update the document link to check further. It looks like the doc link is missing in the original post.
@RohitMungi-MSFT
Apologies - corrected link above. I know we can use blob storage, but i was really looking forward to using Attachments in Cosmos DB, specifically because of the permissions capabilities of allowing access. not sure how i would create and coordinate 2 different permission brokers (one for Cosmos DB) and (one for Blob Storage). I'm hoping CosmosDB/Attachmnets is going to be replaced by CosmosDB/Attachments2 or something else..
@HUBBER12 You can upload the attachment into BlobStorage and get the blob url(s).
Then create a document in CosmosDB with the links.
The permissions to the blob will have to be managed separately and not within CosmosDB
Providing additional information per the REST API for Cosmos DB. See the Remarks section for the Create Attachment operation:
There are two ways to create an attachment resource – post the media content to Cosmos DB like in the AtomPub Protocol, or post just the attachment metadata to media stored externally.
The first is to POST the raw media in the body payload to store it in the provided attachment storage under your Cosmos DB account. To create this type of attachment, you must include the raw attachment (video, audio, file, blob, etc.) as the body of the POST. Two headers must be set: Content-Type and Slug. The Content-Type header is set to the MIME type of the attachment while the Slug header is set to the name of the attachment.
The second way to create an attachment resource is to POST the attachment resource properties noting the type and media link of the attachment. Unlike the first type of attachment resource, you must not set the Content-Type and Slug headers.
@HUBBER12 We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.
@Mike-Ubezzi-MSFT - Thanks for responding. I do find your post above helpful. but i'm wanting confirmation/clarificatoin about CosmosDB-Attachments (Your first option). Documentation shows that Attachments Feature in Cosmos DB is being depreciated (going away)..
Is it being replaced with something else, or is the only way in the near future your second option through blob storage?
@HUBBER12 Thank you for the additional context. Let me get an answer for you.
@abhijitpai and @markjbrown The Storage and Throughput section of this document states that the attachment feature is being deprecated. Is there a desired method going forward or new functionality that will be released? Thank you!
Maximum attachment size per Account (Attachment feature is being depreciated) | 2 GB
-- | --
@HUBBER12 Currently attachments are under deprecation, we recommend that you use Azure blob storage. There aren't any plans for the attachments version 2. However, we are working on AAD support with new roles that will allow you to manage permissions in an easier way.
Thanks @SnehaGunda. Please close this case now. Have a great rest of your week.