Fixed local file passing

This commit is contained in:
Fergal Moran
2017-11-12 20:56:43 +00:00
parent dd4007af26
commit de3ef13e1c
4 changed files with 8 additions and 8 deletions

View File

@@ -72,11 +72,11 @@ namespace PodNoms.Api.Controllers
Podcast = podcast
};
entry.AudioUrl = await CachedFormFileStorage.CacheItem(file);
var localFile = await CachedFormFileStorage.CacheItem(file);
await _entryRepository.AddOrUpdateAsync(entry);
await _unitOfWork.CompleteAsync();
BackgroundJob.Enqueue<IAudioUploadProcessService>(service => service.UploadAudio(entry.Id));
BackgroundJob.Enqueue<IAudioUploadProcessService>(service => service.UploadAudio(entry.Id, localFile));
return new OkObjectResult(_mapper.Map<PodcastEntry, PodcastEntryViewModel>(entry));
}
return NotFound();