String file = Lib.resource.getDir(context, Params.Access.PUBLIC, id) + getFileName(result.getText());
//-----------------------------------------------------------------------
//--- remove thumbnail
dataMan.unsetThumbnail(context, id, type.equals("small"), true);
File thumbnail = new File(file);
if (thumbnail.exists()) {
if (!thumbnail.delete()) {