public IActionResult Index() { BackblazeAPI backblazeAPI = new BackblazeAPI(); backblazeAPI.AutorizeAccount(); return(View()); }
public IActionResult DownloadFile(Guid id) { BackblazeAPI api = new BackblazeAPI(); api.AutorizeAccount(); FileDescription fileDescription = _fileDescriptionsRepository.GetFile(id); byte[] filebytes = api.DownloadFileById(fileDescription.BackblazeFileId); return(File(filebytes, "application/pdf", fileDescription.FileName + fileDescription.Ext)); //fileDescription.ContentType }