Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

CSV Transfer

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
ricklincs
Posts: 107
Joined: Mon Aug 01, 2011 5:39 pm
Has thanked: 33 times

CSV Transfer

Unread post by ricklincs »

I use the CSV Transfer to pull daily files into a table.
It's great and a useful tool. I am trying to look into adding a Delete File after import, which will delete the file from the temp directory after it has been sucessfully imported. Any pointers would be gratefully received.
nubuildercsvimport.jpg
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: CSV Transfer

Unread post by kev1n »

Hi,

For the moment, you can solve it like this:

If you add this line in uncommon.php, in the function nuFromCSV(), the csv file will be deleted after the import.
However, it will be deleted in any case.

Code: Select all

unlink('../temp/' . $file);
unlink.png


Maybe I can add a checkbox "Delete after Import" so that the file will be deleted after a successful import.
You do not have the required permissions to view the files attached to this post.
ricklincs
Posts: 107
Joined: Mon Aug 01, 2011 5:39 pm
Has thanked: 33 times

Re: CSV Transfer

Unread post by ricklincs »

Thanks Kev1n, I will try this for the moment, but yes a checkbox "Delete after Import" woukd be the best way. Quick reply from yourself as ever.
ricklincs
Posts: 107
Joined: Mon Aug 01, 2011 5:39 pm
Has thanked: 33 times

Re: CSV Transfer

Unread post by ricklincs »

Thanks Kev1n that worked a treat.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: CSV Transfer

Unread post by kev1n »

This has now been added. (Update required)
delete_after_import.png
You do not have the required permissions to view the files attached to this post.
Post Reply