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.

preguntada hace 7 meses152 visualizaciones
1 Respuesta
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
INGENIERO DE SOPORTE
respondido hace 7 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas