a-thousand-channels / ORTE-backend

Application for creating and managing places (or "Orte") on a map
GNU General Public License v3.0
2 stars 3 forks source link

Image upload crashes w/iOS Tablet #280

Closed ut closed 7 months ago

ut commented 1 year ago

Stack trace

A NoMethodError occurred in images#update:

undefined method []' for #<ActionDispatch::Http::UploadedFile:0x00007f9bc3fea1f8 @tempfile=#<Tempfile:/tmp/RackMultipart20230701-230243-9xt28k.jpeg>, @original_filename="B4E247FB-97F4-4BB0-BE32-B8FFFF4AC319.jpeg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"image[file]\"; filename=\"B4E247FB-97F4-4BB0-BE32-B8FFFF4AC319.jpeg\"\r\nContent-Type: image/jpeg\r\n"> app/models/image.rb:66:instrip_exif_data'

ut commented 10 months ago

This is universal.

tmp_new_image = File.read(attachment_changes['file'].attachable[:io])

fails live but works w/rspec

tmp_new_image = File.read(attachment_changes['file'].attachable)

works live but fails w/rspec

ut commented 7 months ago

fixed