Multiple upload file

Talk about Image/File fields (uploading, problems etc.)

Moderator: alexandrleonenko

dednrgrid
Junior
Junior
Posts: 16
Joined: Jun 1st, '11, 11:00

Multiple upload file

Postby dednrgrid » Mar 8th, '12, 15:25

Hello everyone!
I have the following bug in the add new phase.
I have a user table in which I insert name, surname, email and 3 different PDF attachments (field type "file").
I insert the 3 attachments in their respective fields, but if I want to remove one of them before saving, when I click on "Remove", it removes all 3 attachments.
I repeat that this happens only during the add new before saving.
Can someone explain why?
Thank you very much! ;)

dednrgrid
Junior
Junior
Posts: 16
Joined: Jun 1st, '11, 11:00

Re: Multiple upload file

Postby dednrgrid » Mar 9th, '12, 11:57

It's a bug or a my configuration error? :?:

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Multiple upload file

Postby administrator » Mar 11th, '12, 09:36

This issue will be fixed in the next version.
Currently try following:
open datagrid.class.php file and find there:
if($req_mode != 'add' && $field_value != '') $file = true;

replace this line of code with following:
if($field_value != '') $file = true;


Does it help now?

dednrgrid
Junior
Junior
Posts: 16
Joined: Jun 1st, '11, 11:00

Re: Multiple upload file

Postby dednrgrid » Mar 13th, '12, 10:58

I changed this line:

if($req_mode != 'add' && $field_value != '') $file = true; (approximately line 6786)
with this:
if($field_value != '') $file = true;

and everything works fine.
Thanks for your fast support! ;)


Return to “Field type: "image/file"”