Hi again Nerdture,

According to the implementation of 
you should be able to access instance of* ActionDispatch::Http::UploadedFile 
*with following:

In you examples, you are trying to download file from a storage service to 
a tempfile before it has been uploaded, so storage service fails to locate 

On Wednesday, December 4, 2019 at 7:53:03 PM UTC+1, Nerdture wrote:
> 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 

Reply via email to