public async Task <string> UploadSuggestionImageAsync(Cloudinary cloudinary, IFormFile file) { var isImage = ImageExtensions.IsImage(file); if (!isImage) { return(null); } var url = await this.UploadAsync(cloudinary, file); return(url); }
public async Task <string> UploadGuideImageAsync(Cloudinary cloudinary, IFormFile file) { if (file == null) { var defaultUrl = GlobalConstants.DefaultGuideImage; return(defaultUrl); } var isImage = ImageExtensions.IsImage(file); if (!isImage) { var defaultUrl = GlobalConstants.DefaultGuideImage; return(defaultUrl); } var url = await this.UploadAsync(cloudinary, file); return(url); }