You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, so normal operation all seems to work fine. Uploading a file will set the avatar property to the path, and uploading a different file will change the path. However, if I do something like user.update(avatar: u[:avatar]), the image is deleted and the avatar property stays the same. This could easily happen if, for example, a form was prefilled with the existing values and those values were all passed into a call like user.update(form_params).
It seems to me like this is normally desirable behavior to remove old images when new ones are uploaded. However in this case there isn't a new image to upload and the value doesn't change.
Note that I did not see this behavior on version 0.10.0, only on 1.1.0.
The text was updated successfully, but these errors were encountered:
This is a little tough to pin down a minimal example for, so I'm going to do my best here:
Ok, so normal operation all seems to work fine. Uploading a file will set the
avatar
property to the path, and uploading a different file will change the path. However, if I do something likeuser.update(avatar: u[:avatar])
, the image is deleted and theavatar
property stays the same. This could easily happen if, for example, a form was prefilled with the existing values and those values were all passed into a call likeuser.update(form_params)
.It seems to me like this is normally desirable behavior to remove old images when new ones are uploaded. However in this case there isn't a new image to upload and the value doesn't change.
Note that I did not see this behavior on version 0.10.0, only on 1.1.0.
The text was updated successfully, but these errors were encountered: