Problem with image resize and upload

Hello, i don’t know what i’m doing wrong with this modal form that should resizes an image, loads it and saves the name in db.
Nothing happens when I click the button…


2
3
4
5
6

Is the form in the modal body and the button in the modal footer? I am willing to bet your button is not inside your form.

Can you provide the code for your form here?

1 Like

By any coincidence has this happened to you Brad? I'm going to admit it got me a few times in the past... :smiley:

Not so much in modals as I always delete the modal footer anyways (unless I have some specific reason to use it).

But I have definitely inadvertently added a button outside my form (or forgot to set it to submit) and bang my head against the wall a few times trying to figure out what is wrong. It’s one of the first things I look for now.

1 Like

Thanks, I was able to partially solve the problem. Now the image is loaded, but the field inside the table is not written… Some idea?


9

Be sure that you have both the id and the name of your file upload form input called ‘image_upload’. Perhaps. you have missed the name?

The id is correct (it’s a session variable). The name of my file is what you see in the screenshot ({{image_upload.name}}. I hope it’s the right field
10


12

Hello Marko,

What exactly have you added in your server action? Have you used the “summernote image upload” template there without using the summernote editor on the page? If you did this, then it’s not correct.

You need a file upload step, a load image step, resize step and save step to save the resized image on the server. Make sure to correctly select your upload field from under POST when you import it there.

Also - where is this session coming from exactly?

These are all well explained in the docs already…

Thanks you, I followed the procedure carefully and redid this part. The only difference from the tutorials is that I update and not insert.
Apart from that, I still have the same problem as before, i.e. the file is resized and loaded, but the name is not put in the DB
In the last screenshot you see also the session value I’ve put on top of the modal to check that’s the value is correct

13 14 15 16 17 18

But browser sessions and server session are two totally different things. The session component in App Connect uses browser sessions. The $_SESSION you are trying to use in the server action is a server session.
You can't get the value of the browser session on the server side using $_SESSION variables.

Solved: I put a text field with the value “Session (” anagrid "). At that point I added a variable POST: ID and modified the conditions in update query.
Thanks.