I would like to store data taken on the web in Active Storage in Rails. However, the data is not saved properly and I get an error in video_tag
.
I have succeeded in creating the Blob data, but I have not been able to upload it.
Error
ActiveSupport::MessageVerifier::InvalidSignature
<%= f.hidden_field :media, id: "download-video" %>
// => <input id="download-video" type="hidden" value="blob:http://localhost:3000/859031b4-022b-4e7e-be08-518c77e8e9d1" name="post[media]">
app/models/post.rb
class Post < ApplicationRecord
belongs_to :user
has_one_attached :media
end
app/models/posts_controller.rb
---
def create
@post = current_user.posts.create(create_params)
@post.save
end
---