Actually Hans I believe that both Si and I both expressed support for the other approach and strongly disagree with truncating the filename just in order to create a composite contentName.

As I mentioned in my message if we want a field that has all of the information it should NOT be the contentName, it should be the description. The contentName should just be the filename.

Rather than start a commit war over this, let's get opinions out on the table and if there is not a consensus everything is okay with, we'll have to vote on it.

-David


On Jan 29, 2007, at 2:54 AM, [EMAIL PROTECTED] wrote:

Author: hansbak
Date: Mon Jan 29 01:54:16 2007
New Revision: 500985

URL: http://svn.apache.org/viewvc?view=rev&rev=500985
Log:
as discussed in several emails this commit reverts 499102 and 499122 and makes sure the contentname always contains information about the attached file

Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/email/ EmailWorker.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ email/EmailWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/ src/org/ofbiz/content/email/EmailWorker.java? view=diff&rev=500985&r1=500984&r2=500985 ====================================================================== ======== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/ EmailWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/ EmailWorker.java Mon Jan 29 01:54:16 2007
@@ -91,7 +91,10 @@
                                                        ) )
                        {
                                String attFileName = part.getFileName();
-                               commEventMap.put("contentName", attFileName);
+                               if (attFileName != null && attFileName.length() 
> 16) {
+                                       attFileName = 
attFileName.substring(0,16);
+                               }
+ commEventMap.put("contentName", subject + "-" + attachmentCount + " " + attFileName);
                                commEventMap.put("drMimeTypeId", 
thisContentType);
                                if (thisContentType.startsWith("text")) {
                                        String content = 
(String)part.getContent();



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to