Hi guys/gals, I have a couple of questions for anyone that can answer:
- I’m trying to upload video files to S3. I’ve got it all working through the rest api except that when I try to send the video file it’s sending the local file path rather than the data. Is there a way for me to send the data, like we do to MediaDB/Cloudinary?
I realize that I can send it to the MediaDB and then to S3, but that seems like a really costly way to get it to S3.
- The front video camera on my Android device looks like it’s kind of got a filter on it. Everything is elongated. Anyone else experiencing this?
Everything looks normal on IOS.
Are there any controls to change the recording quality on the video recorder?
Do we have a way to delete recordings from the cache? Or is there some type of size limit? I want to delete them when the upload is finished.
Thanks in advance!
Are you uploading photos to s3 with the api also? I didn’t realize we could send photos this way. If so, could you show what blocks you’re using to accomplish this?
Right now you have to upload to MediaDB and then you can upload that link to S3. I’m using an AWS Lambda script in Python. The script is super simple. Just spool up a new Lambda script and send your url to the lambda event from Thunkable as follows:
Here’s the python script:
def lambda_handler(event, context):
#Upload to S3
url=cloudinaryUrl # put your url here
bucket = 'yourBucket' #your s3 bucket
key = 'yourVideoOrPictureName' #your desired s3 path or filename
s3.upload_fileobj(http.request('GET', url, preload_content=False), bucket, key)
Make sure your picture or video name (the “key”) has the proper ending ie. .jpg or .mov or whatever file type it is.
Unfortunately setting up your lambda rights to write to S3 can be a little more complicated, though AWS has simplified it recently. There’s lots of documentation out there on that. Plan on spending a day or two getting familiar with AWS systems if you’re not already.
Once there’s a way to get the contents of the photo or video file rather than just the path reference I can show you how to go directly to S3 using an pre-signed url from s3 rather than uploading to Cloudinary first.
I am waiting for a file api!! Thanks for sharing!!
I have taken similar approaches in the past. Solid work!