private static void AddImages(NewsArticleModel newsArticle, NewsArticle newsArticleEntity)
        {
            foreach (string imageUrl in newsArticle.ImagesUrls)
            {
                Entry       uploadFileEntry = DropboxUtilities.UploadImage(imageUrl, dropbox, "New_Folder");
                DropboxLink imageLink       = dropbox.GetShareableLinkAsync(uploadFileEntry.Path).Result;

                newsArticleEntity.ImagesUrls.Add(imageLink.Url);
            }
        }
Beispiel #2
0
        private static void AddImages(NewsArticleModel newsArticle, NewsArticle newsArticleEntity)
        {
            for (int i = 0; i < newsArticle.ImagesUrls.Count; i++)
            {
                Entry uploadFileEntry = DropboxUtilities.UploadImage(newsArticle.ImagesUrls[i], dropbox, "New_Folder");

                DropboxLink imageLink = dropbox.GetMediaLinkAsync(uploadFileEntry.Path).Result;

                newsArticle.ImagesUrls[i] = imageLink.Url;
            }
        }