Thanks Mladen Ilic for your reply.  

I think I am getting closer to the solution I need.

You should be able to access the attachment with 
> `record.attachment_changes['pv_file']`. 
>

I must be doing something wrong, as I can't figure out how to access the 
actual file contents/octet-stream.

post_body << self.attachment_changes['pv_file']
throws Zlib::Data Error incorrect header check

post_body << self.attachment_changes['pv_file'].blob.download
throws Aws::S3::Errors::NoSuchKey

post_body << self.attachment_changes['pv_file'].blob.open
throws ActiveStorage::FileNotFoundError

I am sure I am showing my Ruby ignorance here.

Any help is appriciated.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-core/38ecc9f7-adae-4571-8729-66fb5bf2c316%40googlegroups.com.

Reply via email to