VRFS-3936 had to tweak mobile recording uploads
This commit is contained in:
parent
cd762dcd15
commit
afe8380280
|
|
@ -28,8 +28,12 @@ module JamRuby
|
|||
# save first to get a valid created_at time
|
||||
mru.save!
|
||||
|
||||
# CarrierWave says we need a file extension, doesn't get provided
|
||||
tmpfile = Tempfile.new([file_name, File.extname(file_name)])
|
||||
tmpfile.write(file)
|
||||
|
||||
# now that the model exists (created_at exists), we can save the file in the correct path
|
||||
mru.file_url = file
|
||||
mru.file_url = tmpfile
|
||||
mru.save
|
||||
mru
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue