Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

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 1704 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://www.youtube.com/channel/UCYiyz1 ... 1iw/videos
Thanks
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 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
[email protected],hp_bills,monthly,MYR,200
[email protected],training_seminar,yearly,MYR,2000
[email protected],subscription_memberships,yearly,MYR,2000
[email protected],travelling,monthly,MYR,500
[email protected],hp_purchase,yearly,MYR,1000
[email protected],accommodation,yearly,MYR,5000
[email protected],per_diem_allowance,monthly,MYR,500
[email protected],mileage,monthly,MYR,100

Hi, In your first algorithm you can use a code lik[…]

Community vs Enterprise

Hi, The process core of both versions is almost th[…]

Hi, 1. Open your process designer 2. Click on perm[…]

Hi, You can use PHP EXCEL library. Please check th[…]