public CloudinaryService(IConfiguration configuration) { cloudinary = CloudinaryHelper.GetCloudinary( configuration["Cloudinary:Cloud"], configuration["Cloudinary:ApiKey"], configuration["Cloudinary:ApiSecret"] ); }
public CloudinaryServices(IConfiguration configuration) { this.configuration = configuration; string CloudName = this.configuration["CloudinarySetting:CloudName"]; string ApiKey = this.configuration["CloudinarySetting:ApiKey"]; string ApiSecret = this.configuration["CloudinarySetting:ApiSecret"]; helper = new CloudinaryHelper(CloudName, ApiKey, ApiSecret); }
public AdminController(DataContext cntx, UserManager <User> userManager, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfgig, IDatingRepository repo) { _repo = repo; _mapper = mapper; _cntx = cntx; _userManager = userManager; _cloudinary = CloudinaryHelper.GetCloudinaryInstance(cloudinaryConfgig); }
public PhotoController(IDatingRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfgig, DataContext cntx) { _cntx = cntx; _cloudinaryConfgig = cloudinaryConfgig; _mapper = mapper; _repo = repo; _cloudinary = CloudinaryHelper.GetCloudinaryInstance(cloudinaryConfgig); }
public ProductService(ProductContext context, IMapper mapper, ILogger <ProductService> logger, CloudinaryHelper cloudinaryHelper) { _context = context; _cloudinaryHelper = cloudinaryHelper; _mapper = mapper; _logger = logger; }
public PagesController(ICRUDRepo repo, IOptions <CloudinarySettings> cloudinarySettings) { CloudinaryDotNet.Account account = new CloudinaryDotNet.Account() { ApiKey = cloudinarySettings.Value.ApiKey, ApiSecret = cloudinarySettings.Value.ApiSecret, Cloud = cloudinarySettings.Value.CloudName }; _cloudHelper = new CloudinaryHelper(account); _repo = repo; }
public SectionsController(ICRUDRepo repo, IMapper mapper, IOptions <CloudinarySettings> cloudSettings) { _mapper = mapper; _repo = repo; _cloud = new CloudinaryHelper(new CloudinaryDotNet.Account() { ApiKey = cloudSettings.Value.ApiKey, ApiSecret = cloudSettings.Value.ApiSecret, Cloud = cloudSettings.Value.CloudName }); }
public WordsController(ICRUDRepo repo, IMapper mapper, IOptions <CloudinarySettings> cloudinarySettings, IUploadService dropbox) { var cloudAccount = new CloudinaryDotNet.Account() { ApiKey = cloudinarySettings.Value.ApiKey, ApiSecret = cloudinarySettings.Value.ApiSecret, Cloud = cloudinarySettings.Value.CloudName }; _mapper = mapper; _repo = repo; _cloud = new CloudinaryHelper(cloudAccount); _dropbox = dropbox; }
public QuestionsController(ICRUDRepo repo, IMapper mapper, IOptions <CloudinarySettings> cloudSetting, IUploadService dropBox, IConfiguration config) { _dropBox = dropBox; var account = new CloudinaryDotNet.Account() { ApiSecret = cloudSetting.Value.ApiSecret, ApiKey = cloudSetting.Value.ApiKey, Cloud = cloudSetting.Value.CloudName }; _helper = new CloudinaryHelper(account); _mapper = mapper; _repo = repo; _config = config; }
public AccountsController(IAuthRepo repo, ICRUDRepo cRUDRepo, IMapper mapper, IConfiguration config, IOptions <CloudinarySettings> cloudinarySettings, Func <ServiceEnum, IAuthService> serviceResolver, UserManager <Models.Account> userManager, RoleManager <Models.Role> roleManager, SignInManager <Models.Account> signinManager) { _roleManager = roleManager; _signinManager = signinManager; _userManager = userManager; _cRUDRepo = cRUDRepo; _config = config; _googleService = serviceResolver(ServiceEnum.Google); _facebookService = serviceResolver(ServiceEnum.Facebook); _mapper = mapper; _repo = repo; var account = new CloudinaryDotNet.Account() { Cloud = cloudinarySettings.Value.CloudName, ApiKey = cloudinarySettings.Value.ApiKey, ApiSecret = cloudinarySettings.Value.ApiSecret }; _cloud = new CloudinaryHelper(account); }
/// <summary> /// Test deleting the image from cloudinary with images public id /// </summary> /// <param name="publicId">public id from cloudinary</param> /// <returns>instance of <see cref="HttpStatusCode"/></returns> private async Task <HttpStatusCode> DeleteAsync_FromCloudinary(string publicId) { return(await CloudinaryHelper.DeleteAsync(publicId)); }
/// <summary> /// Tests uploading image to cloudinary from the web (random picture) and fs /// Assert is true if the return object has a status 200 /// </summary> /// <param name="imgUrl">image url from cloudinary</param> /// <returns>instance of <see cref="CloudinaryImageOperationDto"/></returns> private async Task <CloudinaryImageOperationDto> UploadAsync_Test(string imgUrl) { return(await CloudinaryHelper.UploadAsync(imgUrl)); }