Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By mfaisel
#827175
Hi,

I am using a multi-file upload. When I upload a CSV file, the following error occurs

Image

As a temporary solution, I changed the file extension from .csv to .txt

How do I fix this issue permanently?
Attachments
ProcessMaker-Upload-CSV-error.png
ProcessMaker-Upload-CSV-error.png (9.17 KiB) Viewed 5336 times
User avatar
By programerboy
#827181
Hi,
You are not allowed to upload a file by changing the format for security reasons (For example change csv to txt)
To fix your problem, set the following settings in the env.ini file:
Code: Select all
enable_blacklist = 1
files_white_list = 'docx, xlsx, doc, xls, jpeg, jpg, png, pdf, zip, csv, txt'
The path of this file is :
\opt\processmaker\workflow\engine\config\env.ini

https://pmlearning.info
Thanks
Last edited by programerboy on Wed Apr 07, 2021 1:14 am, edited 1 time in total.
User avatar
By mfaisel
#827186
dan123dan wrote: Mon Dec 16, 2019 11:37 am Hi,

Make sure that you allow the CVS extension on your dynaform.

Because if a file with a different extension is attached, a validation error message is shown.

To more information about this, check the wiki, https://wiki.processmaker.com/3.1/Multi ... Extensions

let me know if everything is OK.
Thank you for the advice.

However, the recommended steps do not fix the problem. I am still getting the same error message.

Thanks again.
User avatar
By mfaisel
#827187
programerboy wrote: Mon Dec 16, 2019 1:20 pm Hi,
You are not allowed to upload a file by changing the format for security reasons (For example change csv to txt)
To fix your problem, set the following settings in the env.ini file:
Code: Select all
enable_blacklist = 1
files_white_list = 'docx, xlsx, doc, xls, jpeg, jpg, png, pdf, zip, csv, txt'
The path of this file is :
\opt\processmaker\workflow\engine\config\env.ini

https://www.youtube.com/channel/UCYiyz1 ... 1iw/videos
Thanks
The workaround. However, the problem is still there and I am still getting the same error message.

Thank you for helping.
User avatar
By programerboy
#827188
Hi,

This is processmaker base error, please add this code to the customMimeTypes file in the exist array :
Code: Select all
path: \opt\processmaker\config\customMimeTypes.php

'csv' => 'text/csv',

https://pmlearning.info
Thanks
Last edited by programerboy on Wed Apr 07, 2021 1:14 am, edited 2 times in total.
User avatar
By mfaisel
#827191
programerboy wrote: Tue Dec 17, 2019 12:21 am Hi,

This is processmaker base error, please add this code to the customMimeTypes file in the exist array :
Code: Select all
path: \opt\processmaker\config\customMimeTypes.php

'csv' => 'text/csv',


https://www.youtube.com/channel/UCYiyz1 ... 1iw/videos
Thanks
Still same..
Below is my sampel data:
Code: Select all
email,claim_type_code,mode,currency,amount
some.one@some.company.com,hp_bills,monthly,MYR,200
some.one@some.company.com,training_seminar,yearly,MYR,2000
some.one@some.company.com,subscription_memberships,yearly,MYR,2000
some.one@some.company.com,travelling,monthly,MYR,500
some.one@some.company.com,hp_purchase,yearly,MYR,1000
some.one@some.company.com,accommodation,yearly,MYR,5000
some.one@some.company.com,per_diem_allowance,monthly,MYR,500
some.one@some.company.com,mileage,monthly,MYR,100

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]