File Upload and store file name or URL to database not working

Storing the URL or filename from a file upload in my database is giving an error of 500 internal server error, and then I look at what information it is trying to add to my database when choosing filename or url from the file upload step, it is showing as binary instead of the correct value.

Please can someone try a file upload and saving the url to a database and let me know if it is working for them, I have gone over my steps 20 times and it all seems great to me.

hi @psweb
could you share screen shot (server connect steps )

What is the exact error message, Paul? Also what expression are you using?

Here are the steps

Here is the error, basically saying my sql varchar field can not be set to null

Here is the data that is trying to be sent to my database

I tested the operation without the database insert and the image is saved into a folder on my server and made greyscale and resized correctly, so it’s just that last part, the insert that seems like something is going wrong.

Well Paul,
The error says your “accom_symb_description” database field cannot be null. This is not really related to the file uplaload.
Make sure you are passing a value to this field.

On your screenshot I see the value you are trying to pass to it is:

{{$_POST.accom_symb_description}}

while your form input name is called

accom_symbol_description

Which is causing the issue. Make sure the POST var names are the same as the actual form input names.

2 Likes

Thanks Teo, I honestly have no clue how that even got there, must be these silly fingers, can not believe i missed that so many times, honestly, i must be going blind, thank you

1 Like