I'm using Carrierwave Direct with S3 for file uploads.
When a file is uploaded to S3, we take the S3 URL and run it through FFMPEG to measure duration.
duration = `ffmpeg -i "#{post.s3_url}" 2>&1 | grep Duration | awk '{print $2}' | tr -d ,`
The problem is, some of our users are placing special characters in filenames.
I've seen this post showing how to rename files using Fog. However, I'm wondering if there's a simpler way... I'd love to just hardcode the filename in Carrierwave Direct before it's uploaded.
I'm curious what the best approach might be to accomplish this.
Any help is appreciated!