Update detection of last file uploaded and add thumbnail resize and upload.