File PDF upload

I have created an insert page with numerous fields (texts, checkboxes, select …) and 3 file fields for uploading PDF
If I delete the 3 file fields, the save record procedure works correctly.
With the 3 file fields instead, the save is not concluded and no pdf is uploaded
I followed the instructions in the tutorials, or it seems to me that I followed them faithfully, but I can’t understand why it doesn’t work

Out of curiosity have you tried adding one file field at a time? Have you enabled debug and checked for errors?

1 Like

Please check the following tutorial and report the errors you see:

The error is this:
serverconnectForm.js:249 POST
https://www…/dmxConnect/api/adm/auto_insert.php 500

That’s not the error.
Please check the tutorial and check the exact error message that’s is returned, as explained there.

35

Marzio,
Please check the error as explained in the tutorial, really it’s not that hard to follow the steps:

Ok sorry
The message is:

  1. code: 0
  2. file: “D:\home…it\httpdocs\dmxConnectLib\lib\db\Connection.php”
  3. line: 85
  4. message: “Array to string conversion”
    trace: "#0 [internal function]: exception_error_handler(8, ‘Array to string…’, ‘D:\home\…’, 85, Array …

What are your server action steps exactly? Please provide a screenshot.

On the insert page there are many fields (some required and others not) Then there are 3 file fields to upload PDF (but they are not required)
If I fill in the required fields and click on the submit button (without using the 3 file fields) I get that error and the record is not recorded
However, if I delete the 3 file fields from the page, everything works perfectly for all the other fields

Marzio,
What are the steps in your server action?
Are these inputs connected to file upload steps?

To simplify the search, I duplicate the page and remove the other fields, so I can be more precise

I simplified the page leaving only one text field and the 3 file fields.
The error reported is always the same.
Here the complete code of the reduced page
page.rtf.zip (2.0 KB)

Marzio,
I don’t need the content of the page. I just asked you:

What are the steps in your server action?
Are these inputs connected to file upload steps?

Also what is this .rtf file attached?

Sorry but I can’t understand what you want
The page is now very simple: it has 4 fields and the only actions are (when click submit button):

  • inserting a record in a database table (with save text field)
  • the optional upload of the 3 pdf (3 file fields)
    The record action fails if there are 3 file fields, even if they are not used
    If I also delete the 3 file fields the save works

Just send me a screenshot of your server action steps…

Is that what you mean?

No Marzio,
just open the server connect panel, select your server action and send me a screenshot of its steps.