I am following the wiki Adding Direct S3 Uploads
The upload to cache works great
When I try to submit and save the record it fails with the following error:
Processing by PhotosController#create as HTML
Parameters: {“authenticity_token”=>“mtzUus5QVgkvkOUl+tirj2k69vzBykYTiXH6vCQoeWUTdj75KbTkAmbvlK44Gyj3DtuyALt90PmxircPHExzLg==”, “photo”=>{“title”=>“upload-test”, “image”=>"{“id”:“f0c5fccdf9de1d72dc647f2a6f019aa5.jpg”,“storage”:“cache”,“metadata”:{“size”:20,“filename”:“file.name”,“mime_type”:“mp4”}}"}, “commit”=>“Create Photo”}
Completed 500 Internal Server Error in 28ms (ActiveRecord: 0.0ms | Allocations: 3769)
NoMethodError (undefined method `bytesize’ for #Array:0x00007fc419d33b48):
Started OPTIONS "/s3/params?filename=boulder.jpg&type=image%2Fjpeg&" for ::1 at 2020-07-25 00:51:50 -0700
Started GET "/s3/params?filename=boulder.jpg&type=image%2Fjpeg&" for ::1 at 2020-07-25 00:51:50 -0700
Started POST "/photos" for ::1 at 2020-07-25 00:52:42 -0700
Processing by PhotosController#create as HTML
Parameters: {"authenticity_token"=>"dbc/hv8Vk9t5u/3Obzv18H9xs4Ppo1826WrU6Euhl5L8HdXFGPEh0DDEjEWt+HaIGJD3f5MUydzRkZlbc8Ud2Q==", "photo"=>{"title"=>"jm", "image"=>"{\"id\":\"2442b6332011889063beefa720a65563.jpg\",\"storage\":\"cache\",\"metadata\":{\"size\":17017,\"filename\":\"boulder.jpg\",\"mime_type\":\"image/jpeg\"}}"}, "commit"=>"Create Photo"}
Completed 500 Internal Server Error in 24ms (ActiveRecord: 0.0ms | Allocations: 3651)
NoMethodError (undefined method `bytesize’ for #Array:0x00007fc41e020208):