Ejemplo n.º 1
0
        public IActionResult Remove(string name, int?id)
        {
            _blogRepository.RemovePhoto(id);


            _cloudinaryService.Delete(name);

            return(Ok(new { status = 200 }));
        }
 public IActionResult RemoveUploadedPhoto([FromQuery] string name, [FromQuery] int?id)
 {
     _cloudinaryService.Delete(name);
     if (id != null)
     {
         _bannerService.RemoveBannerImage((int)id);
     }
     return(Ok(new { message = "Şəkil silindi" }));
 }
Ejemplo n.º 3
0
 public IActionResult RemoveUploadedPhoto([FromQuery] string name, [FromQuery] int?id)
 {
     _cloudinaryService.Delete(name);
     if (id != null)
     {
         _settingService.RemoveLogo((int)id);
     }
     return(Ok(new { message = "Logo silindi" }));
 }
Ejemplo n.º 4
0
 public IActionResult RemoveUploadedPhoto([FromQuery] string name, [FromQuery] int?id)
 {
     if (id != null)
     {
         _productService.RemovePhotoById(id);
     }
     _cloudinaryService.Delete(name);
     return(Ok(new { message = "Şəkil silindi" }));
 }
Ejemplo n.º 5
0
        public async Task <IActionResult> Remove(string name, int?id)
        {
            if (id != null)
            {
                await _newsService.RemovePhotoById((int)id);
            }

            _cloudinaryService.Delete(name);

            return(Ok(new { status = 200 }));
        }
Ejemplo n.º 6
0
        public IActionResult Remove(string name, int?id)
        {
            if (id != null)
            {
                _departmentRepository.RemovePhotoById((int)id);
            }

            _cloudinaryService.Delete(name);

            return(Ok(new { status = 200 }));
        }
        public IActionResult ProfileImgUpload(IFormFile file)
        {
            var filename = _fileManager.Upload(file);

            var publicId = _cloudinaryService.Store(filename);

            _fileManager.Delete(filename);
            if (_user.ProfileImg != null)
            {
                _cloudinaryService.Delete(_user.ProfileImg);
            }
            _accountDetailRepository.ProfileImgUpload(_user.Id, publicId);



            return(Ok(new
            {
                filename = publicId,
                src = _cloudinaryService.BuildUrl(publicId)
            }));
        }
 public IActionResult Remove(string name)
 {
     _cloudinaryService.Delete(name);
     return(Ok(new { status = 200 }));
 }