Not uploading on my server necessary

amorino 29 Jan, 2012
Hello,
I'm using Chronoforms V3 with the upload fonction.
It woks like a charm after getting the fix that I downloaded from the forum.
But I have a small problem
How could I make the component not saving the files on my server but just sending them directly in the Email as a file attached

Don't need to rename files and don't need to keep them on the server because it will cause an overload

Best regards
Amorino
GreyHead 29 Jan, 2012
Hi Amorino,

We've talked about this before. I think the answers were either (a) to add a cron job to delete all saved files after a few days or (b) to add code to delete the file after the email is sent (this has the potential problem that if the email goes astray then the file is lost).

Bob
amorino 29 Jan, 2012
Hello BOB
Thank you for the answer

Could you please tell me which words should I use in the search form to find that discussion in which you explain how to do this?

I tried some words but I didn't find nothing in this way

Best regards
Amorino
amorino 29 Jan, 2012
hello Bob,
thank you very much I looked to that discussion and I found this code
<?php

$ruta = '/path/to/the/folder/*';
$arxiu = glob($ruta);
array_map('unlink', $arxiu);

?>


It's after said that this is not a perfect code.
Is there a security problem do you think?
Best regards
Amorino
amorino 30 Jan, 2012
Hello Bob,

it works like a charm and so it lets the server empty.

Best regards
Amorino
GreyHead 30 Jan, 2012
Hi Amorino,

Good to hear that it works. I don't think that there is any security risk - except that you have to be certain that you have the correct path so that you don't erase the wrong files.

Bob
This topic is locked and no more replies can be posted.