Image issue

Swany

New member
Hi.
I am using a image file field for the first time to upload an image.
I’m on an iPad using safari.

I have set $upload_field_type = ‘ajax’;

I have two fields in my form, scan_ticket and date.

When I insert a new record the date field does not have use the date picker ( if I set upload_field_type to ‘classic’ it does have a date picker). The scan_ticket field does not show any control to upload the file using Ajax option.

I want to use the Ajax version as it is most modern.

Here is my system settings:

Apache Version 2.4.52
PHP Version 7.2.34
MySQL Version 10.3.31-MariaDB-cll-lve
Architecture x86_64
Operating System linux
Dadabik v 11.1

Any ideas what I may not be doing right?

Thanks
 

eugenio

Administrator
Staff member
Hello Swany,
are you experiencing this issue only on iPad/safari or on desktop computers as well?

Best,
 

Swany

New member
Eugenio

Sorry reply took so long. I had to find a pc to try it on.

Problem is the same for chrome on a pc as well.
 

eugenio

Administrator
Staff member
I can't replicate this issue.
Did your browser console display any error?
Can you see the upload button if there isn't a date field in the form? For example, if you enter the ERP demo on dadabik.com and you try to add a new customer, can you see the "select file" button for the picture?
 

Swany

New member
Eugenio

I don’t get any browser errors.

Yes the erp application shows the select button.
 

eugenio

Administrator
Staff member
Can you see the upload button if there isn't a date field in the form? You said you can see it in the erp demo, how about your application, can you see it if you don't have a date field in the form?
 

Swany

New member
Eugenio

No. Can’t see the upload select, even wen there is no date field.

All I can see is the label for the select field.
 

eugenio

Administrator
Staff member
Hello,
if you can see it in the online demo I think that some changes you might have done on your application have an impact on this issue. Have you changed something (apart from config_custom.php and other custom function files)?

I suggest to build a new app, starting from the original file, on a database containing only one table, to see if you have the same problem.

Best,
 

Swany

New member
Eugenio

That is exactly what I did. I created a new app and that is when I discovered it was not working.
I checked the time stamps on all files and directories in both the new app and my first app and the dates are from the install date except for the custom code I write.

It does not work in either app.
 

Swany

New member
Eugenio

I upgraded to 11.2 and now the select Ajax control shows up.
However, I’m getting an error ‘An error occurred when uploading a file.’
I created the upload directory and edited config.php for such. The upload directory has permission 0755. The image type is jpeg.
 

eugenio

Administrator
Staff member
99% of the times ‘An error occurred when uploading a file.’ is a permissions issue.
Does it work if you use the default uploads directory?
 

Swany

New member
Eugenio

In further testing, here is what I discovered.

The file uploads with the insert form, however, the image is not displayed.

The file upload gets the error in the edit form. Same image.

This is strange.
 
Top