-
-
Notifications
You must be signed in to change notification settings - Fork 20
Description
We have a use case where we want to download content from a variety of spaces and re-upload them as copied pages to a centralized space. The one issue I'm having thus far is copying attachments.
var sourceAttachments = _client.Attachment.GetAttachmentsAsync(sourcePage.Id).Result; foreach (var attachment in sourceAttachments) { _client.Attachment.AttachAsync(targetPage.Id, attachment, attachment.Title, contentType:attachment.Metadata.MediaType); }
When I've uploaded attachments fresh, I've been able to create a bitmap and then upload that as a stream. However, I'm not seeing where the stream is for the attachments I'm getting from the source space.
I may be able to work around this by Downloading and then reuploading the attachment, but naively I'd expect GetAttachmentsAsync and AttachAsync to be able to work in tandem without recreating the file data wholecloth.