I'm using Paperclip-FFMEG to upload video files to my development environment (and, eventually, to a local server when my project goes into production).
When videos are uploaded, the filename is, by default, as follows:
/system/modelnames/paperclipnames/.../mynewfile.mp4?xxxxxxxxxx
I believe the 10 digit figure after the questionmark is a timestamp.
However, the player I will be using to play the videos doesn't like to have anything after the file attachment - so I would like to strip the questionmark, and the timestamp after it, before passing the URL into the player.
I tried to use the following Ruby (I think) strip function:
temp_variable = model.paperclipattribute.url(:blah).strip('?')[0]
However, Rails throws up an error:
wrong number of arguments(1 for 0)
I take it I'm doing this wrong? Any other solutions? I don't want to switch off timestamps entirely, as I only need to do so in this situation.
Thanks!