Re: svn commit: r499122 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r499122 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java

hans_bakker
Hi Si,

Please revert this change, but limit the size to 16. Currently the last
character if the attachment filename is cut of.

lateron the filename is used in the contentname and concatenated with the
number of the attachment and the attachment filename.

see statement:
commEventMap.put("contentName", subject + "-" + attachmentCount + " " +
attFileName);


regards,
Hans

On Wednesday 24 January 2007 03:31, [hidden email] wrote:

> Author: sichen
> Date: Tue Jan 23 12:31:25 2007
> New Revision: 499122
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=499122
> Log:
> Removing some code which must have been committed accidentally as part of
> some NPE fixes.  These always truncated the file name of attachments down
> to the first 17 characters, when in fact the field can take up to 100.  Let
> me know if this code was actually intentional
>
> Modified:
>    
> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.ja
>va
>
> Modified:
> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.ja
>va URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz
>/content/email/EmailWorker.java?view=diff&rev=499122&r1=499121&r2=499122
> ===========================================================================
>=== ---
> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.ja
>va (original) +++
> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.ja
>va Tue Jan 23 12:31:25 2007 @@ -91,9 +91,6 @@
>       ) )
>       {
>       String attFileName = part.getFileName();
> -     if (attFileName != null && attFileName.length() > 17) {
> -     attFileName = attFileName.substring(0,17);
> -     }
>       commEventMap.put("contentName", attFileName);
>       commEventMap.put("drMimeTypeId", thisContentType);
>       if (thisContentType.startsWith("text")) {

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r499122 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java

David E Jones

Wasn't that changed earlier so that the attachment filename could  
have the full field?

I kind of like that, BTW. Perhaps the other info can go in the  
description, but it's really redundant if the Content record is  
attached to the CommunicationEvent anyway.

Just my thoughts on this...

-David


On Jan 23, 2007, at 5:57 PM, Hans Bakker wrote:

> Hi Si,
>
> Please revert this change, but limit the size to 16. Currently the  
> last
> character if the attachment filename is cut of.
>
> lateron the filename is used in the contentname and concatenated  
> with the
> number of the attachment and the attachment filename.
>
> see statement:
> commEventMap.put("contentName", subject + "-" + attachmentCount + "  
> " +
> attFileName);
>
>
> regards,
> Hans
>
> On Wednesday 24 January 2007 03:31, [hidden email] wrote:
>> Author: sichen
>> Date: Tue Jan 23 12:31:25 2007
>> New Revision: 499122
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=499122
>> Log:
>> Removing some code which must have been committed accidentally as  
>> part of
>> some NPE fixes.  These always truncated the file name of  
>> attachments down
>> to the first 17 characters, when in fact the field can take up to  
>> 100.  Let
>> me know if this code was actually intentional
>>
>> Modified:
>>
>> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
>> EmailWorker.ja
>> va
>>
>> Modified:
>> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
>> EmailWorker.ja
>> va URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/ 
>> org/ofbiz
>> /content/email/EmailWorker.java?
>> view=diff&rev=499122&r1=499121&r2=499122
>> =====================================================================
>> ======
>> === ---
>> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
>> EmailWorker.ja
>> va (original) +++
>> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
>> EmailWorker.ja
>> va Tue Jan 23 12:31:25 2007 @@ -91,9 +91,6 @@
>>       ) )
>>       {
>>       String attFileName = part.getFileName();
>> -     if (attFileName != null && attFileName.length() > 17) {
>> -     attFileName = attFileName.substring(0,17);
>> -     }
>>       commEventMap.put("contentName", attFileName);
>>       commEventMap.put("drMimeTypeId", thisContentType);
>>       if (thisContentType.startsWith("text")) {
>
> --
> Regards,
> Hans Bakker
> ANT Websystems Co.,Ltd (http://www.antwebsystems.com)
>
> If you want to verify that this message really originates from
> from the above person, download the public key from:
> http://www.antwebsystems.com/hbakkerAntwebsystems.asc


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r499122 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailWorker.java

hans_bakker
Hi David,

In the content manager it is important to know where the content came from
(email subject and number of attachment) and to keep the original filename
and filename extension.

regards,
Hans

On Wednesday 24 January 2007 08:05, David E. Jones wrote:

> Wasn't that changed earlier so that the attachment filename could
> have the full field?
>
> I kind of like that, BTW. Perhaps the other info can go in the
> description, but it's really redundant if the Content record is
> attached to the CommunicationEvent anyway.
>
> Just my thoughts on this...
>
> -David
>
> On Jan 23, 2007, at 5:57 PM, Hans Bakker wrote:
> > Hi Si,
> >
> > Please revert this change, but limit the size to 16. Currently the
> > last
> > character if the attachment filename is cut of.
> >
> > lateron the filename is used in the contentname and concatenated
> > with the
> > number of the attachment and the attachment filename.
> >
> > see statement:
> > commEventMap.put("contentName", subject + "-" + attachmentCount + "
> > " +
> > attFileName);
> >
> >
> > regards,
> > Hans
> >
> > On Wednesday 24 January 2007 03:31, [hidden email] wrote:
> >> Author: sichen
> >> Date: Tue Jan 23 12:31:25 2007
> >> New Revision: 499122
> >>
> >> URL: http://svn.apache.org/viewvc?view=rev&rev=499122
> >> Log:
> >> Removing some code which must have been committed accidentally as
> >> part of
> >> some NPE fixes.  These always truncated the file name of
> >> attachments down
> >> to the first 17 characters, when in fact the field can take up to
> >> 100.  Let
> >> me know if this code was actually intentional
> >>
> >> Modified:
> >>
> >> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
> >> EmailWorker.ja
> >> va
> >>
> >> Modified:
> >> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
> >> EmailWorker.ja
> >> va URL:
> >> http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/
> >> org/ofbiz
> >> /content/email/EmailWorker.java?
> >> view=diff&rev=499122&r1=499121&r2=499122
> >> =====================================================================
> >> ======
> >> === ---
> >> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
> >> EmailWorker.ja
> >> va (original) +++
> >> ofbiz/trunk/applications/content/src/org/ofbiz/content/email/
> >> EmailWorker.ja
> >> va Tue Jan 23 12:31:25 2007 @@ -91,9 +91,6 @@
> >>       ) )
> >>       {
> >>       String attFileName = part.getFileName();
> >> -     if (attFileName != null && attFileName.length() > 17) {
> >> -     attFileName = attFileName.substring(0,17);
> >> -     }
> >>       commEventMap.put("contentName", attFileName);
> >>       commEventMap.put("drMimeTypeId", thisContentType);
> >>       if (thisContentType.startsWith("text")) {
> >
> > --
> > Regards,
> > Hans Bakker
> > ANT Websystems Co.,Ltd (http://www.antwebsystems.com)
> >
> > If you want to verify that this message really originates from
> > from the above person, download the public key from:
> > http://www.antwebsystems.com/hbakkerAntwebsystems.asc

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc