I am uploading user icons through REST API.
It works as expected and on first run I get my 1170 files in tenant work/icons/users directory.
The problem is when I run a second time my job. All the icons get duplicated on disk… The old user icon should be deleted when it is updated.
The REST calls I am using:
- /loginservice to get a session
- /API/User/identity to search user by username
- /portal/imageUpload to send the picture and store the result as newFilename. The multipart POST data only contain the picture binary content
- /API/User/identity/userid : PUT with JSON { “icon”: “newFilename” }
Did I miss something? Is there a way to force delete an icon through a REST API I am not aware of? The portal do remove the old icon.