0

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 1

0

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;
            }
        }
2
  • 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.
    – Dandy
    Sep 11, 2021 at 11:53
  • Check if you POS system work with UFT-8 or you can set it in configuration
    – Adrian R
    Sep 13, 2021 at 16:52

Your Answer

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

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