public async Task <EntryContent> MarkUploadSuccess(EntryContent entryContent, string uploadUrl) { if (entryContent == null) { throw new ArgumentNullException(nameof(entryContent)); } if (string.IsNullOrWhiteSpace(uploadUrl)) { throw new ArgumentNullException(nameof(uploadUrl)); } _context.Attach(entryContent); entryContent.Persisted = _clock.Now; entryContent.BlobUrl = StringUtilities.ToBase64(uploadUrl); await _context.SaveChanges(); return(entryContent); }
public async Task <EntryMedia> MarkUploadedSuccess(EntryMedia articleEntryMedia, string uploadUri) { if (articleEntryMedia == null) { throw new ArgumentNullException(nameof(articleEntryMedia)); } if (string.IsNullOrWhiteSpace(uploadUri)) { throw new ArgumentNullException(nameof(uploadUri)); } _context.Attach(articleEntryMedia); articleEntryMedia.BlobUrl = StringUtilities.ToBase64(uploadUri); articleEntryMedia.Persisted = _clock.Now; await _context.SaveChanges(); return(articleEntryMedia); }
private async Task UpdateConvertedBlobUrl(EntryContent latestEntry, string storageUrl) { latestEntry.ConvertedBlobUrl = StringUtilities.ToBase64(storageUrl); _context.Attach(latestEntry); await _context.SaveChanges(); }