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.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
CSV Transfer
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: CSV Transfer
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.
Maybe I can add a checkbox "Delete after Import" so that the file will be deleted after a successful import.
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);
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.
Re: CSV Transfer
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.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: CSV Transfer
This has now been added. (Update required)
You do not have the required permissions to view the files attached to this post.