Page 3 of 6
Re: upload file to server
Posted: Mon Nov 18, 2019 3:03 pm
by kev1n
johan wrote:Kevin
I've replaced the part of the code even removed nuStopBrowserResize () but still get the same error.
If you're getting the same error
Code: Select all
ReferenceError: nuStopBrowserResize is not definedindex.php line 82 > scriptElement:79:5
that means the function is still there. Try refreshing the form.
Re: upload file to server
Posted: Mon Nov 18, 2019 3:25 pm
by johan
Kevin
I don't get that error but still can't upload.
Maybe I have to update my nuBuilder.
Re: upload file to server
Posted: Mon Nov 18, 2019 4:18 pm
by kev1n
johan wrote:Kevin
I don't get that error but still can't upload.
Maybe I have to update my nuBuilder.
Are you using nuBuilder4?
Re: upload file to server
Posted: Mon Nov 18, 2019 4:24 pm
by johan
Yes
Re: upload file to server
Posted: Mon Nov 18, 2019 4:40 pm
by kev1n
This script is supposed to work with all nuBuilder4 versions.
Did you revise the upload directory and allowed extensions in upload.php?
Code: Select all
$uploaddir = './documents/';
$allowed = array(
'pdf',
'docx'
);
Re: upload file to server
Posted: Mon Nov 18, 2019 5:02 pm
by johan
Kev1N
My mistake. I forgot to put upload.php in folder upload. It was in libs.
Now I got upload succesfull but fields name, ... are empty
Re: upload file to server
Posted: Mon Nov 18, 2019 5:41 pm
by kev1n
Could you add this alert() to your code?
alert.png
Code: Select all
alert('result.file_name: ' + result.file_name + ' / ' + 'result.file_id: ' + result.file_id + '/ idRowFileName: ' + idRowFileName + '/ idRowFileId: ' + idRowFileId);
This is to see if the variables get populated correctly
Re: upload file to server
Posted: Tue Nov 19, 2019 6:10 am
by johan
Kevin
In witch part do you want me to put this? (js - html or php)
Even though he says upload successful I don't see a file in documents
Johan
Re: upload file to server
Posted: Tue Nov 19, 2019 6:58 am
by kev1n
I updated these 3 files to get more accurate error messages.
https://github.com/smalos/nubuilder-cod ... le_subform
form_custom_code.js
input_type_file.htm
upload.php
Re: upload file to server
Posted: Tue Nov 19, 2019 7:00 am
by kev1n
johan wrote:Kevin
In witch part do you want me to put this? (js - html or php)
Johan
This is in input_type_file.htm
alert.png