I want to know how to get a File Object from the resource url distributed as cdn.

0

First of all, we previously used a method of fragmenting video or audio files from our own server (S3FS) and sending them to the app and receiving them and playing them streaming on the app, but because of the increased server load, we want to change it to a method of creating a File object from the corresponding image url distributed on the CDN and sending it to the app. However, the problem occurred and the code part where the error occurred is as follows.

val filePath=URL("{cdnUrl}{midPath}{fileName}") val file = Paths.get(filePath.toURI().path.toFile()

Thereafter, a FileNotFoundException occurs in the file.exists().

If you directly access cdn pull from your browser, the video file will be downloaded. I'd appreciate it if you could answer which part is the problem.

asked 7 months ago146 views
1 Answer
0

In order to create File Objects from Image URL distributed by CDN(CloudFront), I understand that you have deployed code provided which is running on Origin/Application. We understand that you need assistance in validating the code part which triggers error, unfortunately code support is not provided by AWS[1].

We would suggest you to analyze the logic being applied on your server to generate fragment URL’s from image URL and implement similar on your code.

Useful Link: [1] https://aws.amazon.com/premiumsupport/faqs/#:~:text=AWS%20Support%20does,accounts%20or%20systems

AWS
SUPPORT ENGINEER
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions