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.

已提问 7 个月前151 查看次数
1 回答
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
支持工程师
已回答 7 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则