perf(api): add HTTP range requests on media sources #9
@@ -30,7 +30,7 @@ public class MediaController {
|
||||
public ResponseEntity<APIResponse<UUIDResponse>> compress(
|
||||
@RequestParam("file")MultipartFile file,
|
||||
@Valid @ModelAttribute ClipOptions options
|
||||
) throws IOException, InterruptedException {
|
||||
) throws IOException {
|
||||
Job job = mediaService.compress(file, options);
|
||||
return ResponseEntity.ok(new APIResponse<>(
|
||||
SUCCESS,
|
||||
|
||||
@@ -93,7 +93,7 @@ public class MediaService {
|
||||
);
|
||||
}).exceptionally(ex -> {
|
||||
job.setState(JobState.FAILED);
|
||||
job.setErrorOutput(ex.getMessage());
|
||||
job.setErrorOutput("Compression job failed");
|
||||
logger.error("Compression job with UUID {} failed due to: {}", job.getUuid(), ex.getMessage());
|
||||
return null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user