public async Task <Stream> GetFile(string key) { try { Stream fileStream = await _awss3BucketHelper.GetFile(key); if (fileStream == null) { throw new Exception("File not found"); } return(fileStream); } catch (Exception e) { throw new Exception(e.Message); } }
public async Task <Stream> GetFile(string bucketName, string key) { try { Stream fileStream = await _AWSS3BucketHelper.GetFile(bucketName, key); if (fileStream == null) { Exception ex = new Exception("File Not Found"); throw ex; } else { return(fileStream); } } catch (Exception ex) { throw ex; } }