Class AwsMediaConvertController
- java.lang.Object
-
- org.craftercms.studio.controller.rest.v2.aws.AwsMediaConvertController
-
@RestController @RequestMapping("/api/2/aws/mediaconvert") public class AwsMediaConvertController extends Object
Rest controller for AWS MediaConvert- Since:
- 3.1.1
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description static String
INPUT_PROFILE_PARAM
protected AwsMediaConvertService
mediaConvertService
static String
OUTPUT_PROFILE_PARAM
-
Constructor Summary
Constructors Constructor Description AwsMediaConvertController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultOne<MediaConvertResult>
uploadVideo(javax.servlet.http.HttpServletRequest request)
Uploads a file to S3 and triggers a MediaConvert job
-
-
-
Field Detail
-
INPUT_PROFILE_PARAM
public static final String INPUT_PROFILE_PARAM
- See Also:
- Constant Field Values
-
OUTPUT_PROFILE_PARAM
public static final String OUTPUT_PROFILE_PARAM
- See Also:
- Constant Field Values
-
mediaConvertService
@Autowired protected AwsMediaConvertService mediaConvertService
-
-
Method Detail
-
uploadVideo
@PostMapping("/upload") public ResultOne<MediaConvertResult> uploadVideo(javax.servlet.http.HttpServletRequest request) throws IOException, AwsException, InvalidParametersException, org.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException, SiteNotFoundException, org.craftercms.commons.validation.ValidationException
Uploads a file to S3 and triggers a MediaConvert job- Parameters:
request
- the request- Returns:
- the result of triggering the job
- Throws:
IOException
- if there is any error reading the content of the fileAwsException
- if there is any error uploading the file or triggering the jobInvalidParametersException
- if there is any error parsing the requestSiteNotFoundException
- if the site is not foundorg.craftercms.commons.config.profiles.ConfigurationProfileNotFoundException
- if the profile is not foundorg.craftercms.commons.validation.ValidationException
-
-