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.

gefragt vor 7 Monaten151 Aufrufe
1 Antwort
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-TECHNIKER
beantwortet vor 7 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen