WIP: Submit transcoding jobs via a HTTP API #6
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "api-submission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create a HTTP API for submitting transcoding jobs. Implemented as a three-step process with step one being creating and configuring the transcription job, step two attaching the files to be transcribed, and the final step three submitting the job for processing.
Each job can have multiple files attached to it but they are submitted as individual jobs to the Whisper engine and the system will deal with grouping them together. The user of the API will only receive one final callback once all the individual jobs have been completed, successful or not. This means the user has to deal with potentially partially successful jobs, some files may have been transcoded correctly while others not.
Fixes #2, #3, #4
@ -0,0 +48,4 @@
OutputFormat outputFormat = parseOutputFormat(createTranscriptionRequest.outputFormat());
CreateTranscription createTranscription = new CreateTranscription(owner, callbackUri, outputFormat);
Transcription transcription = transcriptionService.createTranscription(createTranscription);
return new TranscriptionCreatedResponse(transcription.id());
This response should contain a reference to the upload URL for this job.
Fixed in
aa49f418d2
@ -0,0 +84,4 @@
Transcription transcription = transcriptionService.getTranscription(owner, uuid)
.orElseThrow(() -> new TranscriptionNotFound(id));
transcriptionService.addFileToBeTranscribed(transcription, new TranscriptionFile(filename, fileData));
return ResponseEntity.accepted().build();
This response should contain two references to URLs:
Fixed in
8d13dc31c6
@ -0,0 +45,4 @@
public void addFileToBeTranscribed(Transcription transcription, TranscriptionFile file)
throws IOException
{
Path fileToBeTranscribed = fileDirectory.resolve(transcription.id().toString()).resolve(file.filename());
Avoid using the filename provided by the user as a security measure.
Fixed in
515b2aa642
0064149d79
also fixes #7Closing and re-opening to deploy to test server.
Have to merge the workflows first
https://whisper-frontend-api-submission.branch.dsv.su.se
Checkout
From your project repository, check out a new branch and test the changes.