Has anyone had this problem? If I try to import a .csv file, it instantly says "Content of uploaded file was changed, please re-upload the file"
1 Answer
In realation to the file in "/vendor/magento/module-import-export/view/adminhtml/templates/import/form/before.phtml" you shall check if file content format text in "UFT-8", or check if content is corrupted or wrong
if (fileUploader.files.length > 0) {
var file = fileUploader.files[0],
ifrElName = this.ifrElemName,
reader = new FileReader();
reader.readAsText(file, "UTF-8");
reader.onerror = function () {
jQuery('body').loader('hide');
alert({
content: '{$uploaderErrorMessage}'
});
fileUploader.value = null;
jQuery('iframe#' + ifrElName).remove();
return;
}
if (file.lastModified !== this.loadedFileLastModified) {
alert({
content: '{$uploaderErrorMessage}'
});
fileUploader.value = null;
return;
}
}
-
Thanks for your reply. It seems it has something to do with the POS system that is installed, because if I disable it, the import works fine. I am waiting for the POS developer to check what the problem is.– DandyCommented Sep 11, 2021 at 11:53
-
Check if you POS system work with UFT-8 or you can set it in configuration– Adrian RCommented Sep 13, 2021 at 16:52