mettle / sendportal

Open-source self-hosted email marketing. Manage your own newsletters at a fraction of the cost.
https://sendportal.io
MIT License
1.72k stars 339 forks source link

The file must be a file of type: text/csv, Import Error #178

Closed swapinvidya closed 2 years ago

swapinvidya commented 2 years ago

The file must be a file of type: text/csv, text/plain, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.

this error is getting when ever i try to upload any file.

JonoB commented 2 years ago

Make sure that the file you're trying to uploading is one of those types.

mikerockett commented 2 years ago

Unfortunately, this does not work – uploading a CSV file (comma-separated) results in:

image

Additionally, importing an Excel workbook yields errors relating to the email address being required, but it is present.

Update: after further examination, the excel import does not work at all as it does not unpack/parse the file, it just reads it as a text file.

In order to get the CSV working, I had no choice but to update the subscriber import form request to skip the mime type check.

jgardner-qha commented 2 years ago

I am also getting this error. I am not a PHP or Laravel expert by any stretch, so I'm not sure how to get this part working? I've got a couple hundred to import so I don't really want to do this manually. I'm running PHP 8.0 and NGINX and am encountering the same problems as described above.

Pushkraj19 commented 1 year ago

The issue is because of PHP Version. The FAST Excel is not working properly over PHP 7.4. Just change our php version to PHP 7.4 to get it working.