CMS MADE SIMPLE FORGE

Form Builder

 

[#7699] If use file_destination - uploaded file not send

avatar
Created By: Roman Zavalishin (von-hamster)
Date Submitted: Fri Mar 16 07:40:57 -0400 2012

Assigned To:
Version: 0.7.2
CMSMS Version: None
Severity: None
Resolution: Fixed
State: Closed
Summary:
If use file_destination - uploaded file not send
Detailed Description:
If use file_destination option - uploaded file save in this path, but for mail
it takes from current working directory.

my temp fix:


Index: modules/FormBuilder/classes/DispositionEmailBase.class.php
===================================================================
--- modules/FormBuilder/classes/DispositionEmailBase.class.php	(date
1331895325000)
+++ modules/FormBuilder/classes/DispositionEmailBase.class.php	(revision )
@@ -212,7 +212,8 @@
 					else if (strlen($thisAtt) > 0)
 						{ // Fix for Bug 4307
 							// If this doesn't break anything, we can merge it with the code above.
-						$filepath = getcwd();
+						//$filepath = getcwd();
+						$filepath = rtrim($theFields[$i]->GetOption('file_destination'), '/') .
'/';
 						$filepath .= $thisAtt;
 
 						if (function_exists('finfo_open'))


History

Comments
avatar
Date: 2012-06-25 15:38
Posted By: Philippe Thomas (filto)

Same bug and  it solve with  Roman Zavalishin temp fix .

Thanks.

But file uploaded is still on server ...

I didn't find the automated delete function in oder to solve this.
      
avatar
Date: 2012-07-03 08:03
Posted By: Peter Stubbs (applejack1923)

Same here the delete after sending email doesn't work. A work around is to set
the directory to tmp/cache/ and then set the clear cache setting in the general
settings to i.e. 1 day.
      
avatar
Date: 2012-07-25 07:13
Posted By: Graeme Ruthven (GBR)

Same problem here with attachments not being attached to emails.

Roman's fix worked for me (1.10.3). Thanks Roman.

I have CGExtensions 1.28.2, but not sure if this is even relevant.

Not quite so fussed about attachments not being deleted from uploads/temp as I
can manage this so long as the site's owner is receiving attachments with form
submissions.
      
avatar
Date: 2013-09-02 15:48
Posted By: Tapio Löytty (Stikki)

Will check this.
      
avatar
Date: 2013-09-03 05:26
Posted By: Jonathan Schmid (Foaly*)

this has been fixed as of 0.7.4. closing.
      
Updates

Updated: 2013-09-03 05:26
resolution_id: 6 => 7
assigned_to_id: 11306 => 100
state: Open => Closed

Updated: 2013-09-02 15:48
resolution_id: => 6
cmsms_version_id: 29495 => -1
assigned_to_id: 100 => 11306