[AC-382] Photo Uploads Broken on Platform
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-21T18:48:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | arrowdb |
Reporter | Matthew Hewes |
Assignee | Sharif AbuDarda |
Created | 2015-09-26T05:11:28.000+0000 |
Updated | 2015-11-21T18:48:06.000+0000 |
Description
I keep getting this error:
Failed to upload photo: undefined method `destroy' for nil:NilClass
Here's the full response/log from Appcelerator Platform:
Content-Type: =#<ActionDispatch::Http::UploadedFile:0x0000000cffdc80>&custom_fields Content-Type: =#<ActionDispatch::Http::UploadedFile:0x0000000cffdc58>&photo=#<ActionDispatch::Http::UploadedFile:0x0000000cffdc30>&photo_sizes=[object Object]&key={REDACTED}&_session_id={REDACTED}
{ "photo_sync_sizes": [ { "\r": { "original_filename": null, "content_type": "; charset=UTF-8", "headers": "Content-Disposition: form-data; name=\"photo_sync_sizes[]\r\nContent-Type: ; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n", "tempfile": [ null ] } } ], "suppress_response_codes\r\nContent-Type: ": "#<ActionDispatch::Http::UploadedFile:0x0000000cffdc80>", "custom_fields\r\nContent-Type: ": "#<ActionDispatch::Http::UploadedFile:0x0000000cffdc58>", "photo": "#<ActionDispatch::Http::UploadedFile:0x0000000cffdc30>", "photo_sizes": { "preview": { "\r\nContent-Type: ": { "original_filename": null, "content_type": "; charset=UTF-8", "headers": "Content-Disposition: form-data; name=\"photo_sizes[preview]\r\nContent-Type: ; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n", "tempfile": [ null ] } } }, "key": "7Wwhj6FVnEBaEESoH5V56f8Fj6Y4fyEh", "_session_id": "gP_kNthCebYMjDhRfSMHfmjbkog" }
I have been able to verify that it is in fact a TiBlob object that's being uploaded and it seems that maybe it's something happening on the server?
I did some research and it appears to be a Ruby issue?
Harish, That is not the problem. I am sending custom sizing through the API and it was previously returning the correct sizes and uploading the images. Something has happened since. My instance has somehow populated over 1.5gb of space while only 20 images have been uploaded, then photos broke entirely, giving me this error: Failed to upload photo: undefined method `destroy' for nil:NilClass. This is happening on dev and production instances and currently happening in a live app. Thank you!, Matthew
I also get the same error when uploading an image without any sizes specified.
Another update: It's happening in the platform backend form as well. When I try to upload a photo to a user's profile it gives the same error: Failed to upload photo: undefined method `destroy' for nil:NilClass
We have tested the below code to upload photo in the platform. It's working as expected in Android and iOS.
We tested with SDK 5.1.0.v20151023172822,5.0.2.GA. CLI 5.0.4. iOS 9.1, Android 5.1.1.