DMXzone Database Updater PHP Support Product Page

In progress

Insert with File

Reported 23 Mar 2016 18:06:50
1
has this problem
23 Mar 2016 18:06:50 Greta Garberini posted:
This took me a whole afternoon to figure out, due to incomplete manual / video. The scenario was to insert some fields into the database. The fields were as follows:
  1. select
  2. date via dmxCalendar 3
  3. picture
  4. radio buttons (y/n)
  5. input text
  6. textarea (plain text)
  7. textarea via dmxHTMLEditor 3

  8. So, quite a variety. Everything worked fine except when I entered the file field for the picture. At that moment the insert stopped to work altogether.

    In the end I could make it work, but had to follow a strange procedure In Server Actions Panel:
    1. Create the file
    2. Add the file upload
    3. Add database connection
    4. Add Database Insert and bind the post variable - only then the filename for the picture was shown correctly
    5. Move the File Upload AFTER the Database Insert (last position in the steps menu


    6. This was the ONLY way I could make it work. I hope this helps someone who has the same problem.

Replies

Replied 23 Mar 2016 18:12:17
23 Mar 2016 18:12:17 Teodor Kuduschiev replied:
The following video explains how everything should be done: www.dmxzone.com/go/23315/upload-images-and-store-their-names-into-a-database so please follow it...
Replied 24 Mar 2016 06:18:13
24 Mar 2016 06:18:13 Greta Garberini replied:
Thanks for the reply, Teodor.
This video does not help, though. Of course I watched it before posting this. At some other occasion I already pointed out that those videos need to be updated in order to reflect the updated extensions. (BTW, thanks for doing this -> a lot of improvements have been built into)

The display of the updated Server Actions have changed if you follow the video.
"Select the name binding located under it" simply does not exist any more as described in the video -> instead you have a changed menu where you first must not forget to select "file". Then, the video describes a file binding syntax like "file_name.name" which now is just "file_name" without the extension .name
But this - maybe - is just a minor thing which one can figure out by trial and error. It gets more complicated if you read my article at #5:
The main glitch is that after I finished everything I had to change the order in Steps and put the File Upload AFTER the Database Insert. Otherwise the insert simply would not work.

Unfortunately, this way the filename is not saved in the database (well, obviously)
Replied 24 Mar 2016 07:56:28
24 Mar 2016 07:56:28 Teodor Kuduschiev replied:
Hello, the name binding has not been removed. It does exist, just like in the video.
There is an update coming for the file upload, as for some people (including you, obviously) it (the name binding) was not visible, after the server connect update. You can just manually add the .name after {{file_name}} ... it will also work.
Everything is absolutely the same and this tutorial does not need an update.
Replied 25 Mar 2016 09:43:41
25 Mar 2016 09:43:41 Greta Garberini replied:
Well, so the tutorial is fine but the extension has a flaw, right? The file from "Steps" needs the part ".name" added to the filename, like {{FileUploadStepName.name}} .

If this is not done the whole stuff simply does not work. Glad to read it will be updated. My problem was that this step was shown in the tutorial but did not show up in the SC Insert Options Panel. I acknowldge that the tutorial is OK.
Replied 25 Mar 2016 10:00:56
25 Mar 2016 10:00:56 Teodor Kuduschiev replied:
Yes, it was an issue with the extension actually.
I believe you have an access to the early releases - so please get the new extension from there, it is fixed.

Reply to this topic