1

When a user updates his account picture (default "picture" field,) his existing picture is deleted and replaced with the new uploaded picture. This is normally done by default.

How, using Rules (or any other way,) do I prevent the system from deleting the original stored picture so that the old and new picture reside in the same directory?

Thanks. :)

Update: Someone suggested making the field multiple value. I do not want users to be able to upload several account pictures. All I want is that a newly uploaded picture will indeed replace the old one but the old picture not to be deleted. Like I said in a comment below, the Heartbeat module takes a snapshot of the account picture. When users uploads a new picture, the old picture in the snapshot no longer displays (of course, it was deleted!) and a blank empty space is shown instead. Keeping the old picture would solve this issue.

3
  • What if you make that field multivalued and conditionally show/hide its values ?
    – mchar
    Aug 19, 2016 at 23:24
  • The issue is not with the field. It's With the Heartbeat module that displays a snapshot set in time. When the user uploads a new picture the old picture in Heartbeat disappears and is blank.
    – user14666
    Aug 20, 2016 at 0:07
  • If I could keep the old picture, it would display exactly as it was when the heartbeat created it.
    – user14666
    Aug 20, 2016 at 0:10

1 Answer 1

0

When a user adds a new pictures make a copy of this pictures with rules to a user specific directory. When a user wants to restore his picture browse this directory, let the user decide which picture he wants and copy it back with rules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.