Does anyone know how you can add to the "Download to CSV" code in the nuBuilder Code Library so that you also get an additional file that contains the MD5 value for the CSV file?
Thanks,
Paul
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.
Add Seperate MD5 File of CSV Download
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Add Seperate MD5 File of CSV Download
I think you'll have to save the file to the server first and calculate its md5. Then write it to a file and download both files to the browser.
Instead of
you would write it to a file on the server
Then after fclose($fp) use md5_file() to retrieve its md5.
Use fwrite() etc. to write it to a file.
Finally, download both files (example)
Instead of
Code: Select all
$fp = fopen('php://output', 'w');
Code: Select all
$fp = fopen('something.csv', 'w');
Use fwrite() etc. to write it to a file.
Finally, download both files (example)
Re: Add Seperate MD5 File of CSV Download
Thanks kev1n, will have a look and see what I can work out.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact: