Page 2 of 6

Re: upload file to server

Posted: Fri Nov 15, 2019 6:14 pm
by johan
That would be nice but didn't work when uploading to our server.

Re: upload file to server

Posted: Sat Nov 16, 2019 1:19 pm
by kev1n
I'm preparing an example to upload a file per row.

Re: upload file to server

Posted: Sat Nov 16, 2019 3:43 pm
by johan
Wonderfull, thanks for your help.

Re: upload file to server

Posted: Sun Nov 17, 2019 9:46 am
by kev1n

Re: upload file to server

Posted: Mon Nov 18, 2019 1:11 pm
by johan
Kevin
Thanks for your help. I've tried to set this up in my Nubuilder

When I upload a file I get the error Upload failed.

Only thing I've modified is this part of form_custom_code.js so it points to my table.

Code: Select all

var uploadFolder = 'libs/upload/documents/';
var idFileName = 'files_file_name';
var idFileId = 'files_file_id';
var idSubForm = 'sample_files';
Any idea what I missed?

Re: upload file to server

Posted: Mon Nov 18, 2019 1:23 pm
by kev1n
Do you see any error messages in the developer console (F12)? or your PHP log file?

Re: upload file to server

Posted: Mon Nov 18, 2019 1:52 pm
by kev1n
There was a mistake:

Replace this

Code: Select all

createDownloadLink(idSubForm + nuPad3(i) + fileNameId, uploadFolder, fileId, fileName);
With

Code: Select all

createDownloadLink(idSubForm + nuPad3(i) + idFileName, uploadFolder, fileId, fileName);
in form_custom_code.js

Re: upload file to server

Posted: Mon Nov 18, 2019 1:57 pm
by johan
This error

Code: Select all

ReferenceError: nuStopBrowserResize is not definedindex.php line 82 > scriptElement:79:5
    <anoniem> https://registratie.cawdekempen.be/preventie/index.php line 82 > scriptElement:79
    jQuery 3
    nuAddJavascript https://registratie.cawdekempen.be/preventie/nuform.js?ts=20180509002054:2994
    nuBuildForm https://registratie.cawdekempen.be/preventie/nuform.js?ts=20180509002054:122
    successCallback https://registratie.cawdekempen.be/preventie/nuajax.js?ts=20180509002054:109
    success https://registratie.cawdekempen.be/preventie/nuajax.js?ts=20180509002054:15
    jQuery 4
        fire
        fireWith
        done
        callback

Re: upload file to server

Posted: Mon Nov 18, 2019 2:07 pm
by kev1n
Just remove or comment out nuStopBrowserResize (); (seems like you are not using the latest nuBuilder - this function has been added recently)

Re: upload file to server

Posted: Mon Nov 18, 2019 2:53 pm
by johan
Kevin
I've replaced the part of the code even removed nuStopBrowserResize () but still get the same error.