FastAPI, SqlAlchemy Admin and a video CDN

  Kiến thức lập trình

I have an educational software nearing completion. Backend is FastAPI and front end is React Native. Front end is working well on IOS and Android. App has a lot of short videos. 10MB to 50MB range. So, I was hoping to use CDN for better performance. I looked at CloudFlare R2 ( supposed to be S3 compatible ). However, I could not get it working. I am using SqlAlchemy Admin and it can use S3 compatible fastapi_storages
In the end, I did not see any examples and docs were not satisfactory.
I looked at AWS S3 but people don’t seem to be happy with performance. It is also not so easy to setup.
If I could setup R2 it has PreSignedURL option which is nice but I could not find any examples. I tried to use boto3 with CloudFlare which was not happening. Are there any easy options that I do not know? I just want to move videos to a CDN and integrate in to my admin so I can upload more videos in the future. Any suggestions?

LEAVE A COMMENT