Is it possible to get an email for every fileupload?
I want to get informed when a file was uploaded,.... is it possible?
Thank you
XFileSharing Pro - EMail notification on each Fileupload
Re: EMail notification on each Fileupload
Yes is possible but all others files sharing service get this feature?kleinergeist191 wrote:Is it possible to get an email for every fileupload?
I want to get informed when a file was uploaded,.... is it possible?
Thank you
Regards.
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
No such feature by default. Cause it will spam owner if it's popular service.
But here goes quick hack for you: in index.cgi find
and add this code above:
But here goes quick hack for you: in index.cgi find
Code: Select all
$ses->PrintTemplate("upload_results.html",
Code: Select all
my $tmpl = $ses->CreateTemplate("confirm_email_user.html");
$tmpl->param('files' => \@arr);
$ses->SendMail( $c->{contact_email}, $c->{email_from}, "$c->{site_name}: File send notification", $tmpl->output() );
-
- Posts: 7
- Joined: Jun 03, 2008 12:04 pm
Now i ge an error after upload a file
Code: Select all
Software error:
HTML::Template->new() : Cannot open included file confirm_email_user.html : file not found. at Modules/HTML/Template.pm line 329
HTML::Template::_init_template('HTML::Template=HASH(0x89a710)') called at Modules/HTML/Template.pm line 123
HTML::Template::_init('HTML::Template=HASH(0x89a710)') called at Modules/HTML/Template.pm line 79
HTML::Template::new('HTML::Template', 'filename', 'confirm_email_user.html', 'die_on_bad_params', 0, 'loop_context_vars', 1) called at Modules/Session.pm line 131
Session::CreateTemplate('Session=HASH(0x73cf70)', 'confirm_email_user.html') called at index.cgi line 221
main::UploadResult called at index.cgi line 47
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
replace
with
Code: Select all
"confirm_email_user.html"
Code: Select all
"Templates/confirm_email_user.html"
-
- Posts: 7
- Joined: Jun 03, 2008 12:04 pm
Runs now
added now
and it worked
Code: Select all
my $tmpl = $ses->CreateTemplate("Templates/confirm_email_user.html");
$tmpl->param('files' => \@arr);
$ses->SendMail( $c->{contact_email}, $c->{email_from}, "$c->{site_name}: File send notification", $tmpl->output() );
-
- Posts: 7
- Joined: Jun 03, 2008 12:04 pm
In Version 1.2 it don´t work anymore.
Code: Select all
HTML::Template->new() : Cannot open included file Templates/Templates/confirm_email_user.html : file not found. at Modules/HTML/Template.pm line 329
HTML::Template::_init_template('HTML::Template=HASH(0x883210)') called at Modules/HTML/Template.pm line 123
HTML::Template::_init('HTML::Template=HASH(0x883210)') called at Modules/HTML/Template.pm line 79
HTML::Template::new('HTML::Template', 'filename', 'Templates/Templates/confirm_email_user.html', 'die_on_bad_params', 0, 'global_vars', 1, 'loop_context_vars', 1, ...) called at Modules/Session.pm line 122
Session::CreateTemplate('Session=HASH(0x73cf70)', 'Templates/confirm_email_user.html') called at index.cgi line 300
main::UploadResult called at index.cgi line 57
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Enable your logic
replace
with
replace
Code: Select all
my $tmpl = $ses->CreateTemplate("Templates/confirm_email_user.html");
Code: Select all
my $tmpl = $ses->CreateTemplate("confirm_email_user.html");