id3tag icon indicating copy to clipboard operation
id3tag copied to clipboard

Integration with ActiveStorage

Open mvondoyannick opened this issue 4 years ago • 2 comments

How can i use id3tag with activeStorage?

mvondoyannick avatar Jul 21 '21 15:07 mvondoyannick

      tag = ID3Tag.read("#{request.base_url}#{Rails.application.routes.url_helpers.rails_blob_path(@podcast.audio_file, only_path: true)}")
      puts "#{tag.artist}"

this integration with activeStorage send me this error

undefined method `seek' for #<String:0x00007f3764734dd8>

mvondoyannick avatar Aug 03 '21 06:08 mvondoyannick

Hello @mvondoyannick!

ID3Tag.read method expects opened file handle as an argument. In your example you are passing a string with an URL.

krists avatar Aug 05 '21 07:08 krists