Bug [ 1671016 ] Attachment name should be different for Att. in file system
Name of attachment entry in AD_Attachment is now xml (because the attachment description is an xml file) for Attachments stored in the file system
This commit is contained in:
parent
a0ff348a76
commit
f478a59fb5
|
@ -140,6 +140,8 @@ public class MAttachment extends X_AD_Attachment
|
||||||
public static final String NONE = ".";
|
public static final String NONE = ".";
|
||||||
/** Indicator for zip data */
|
/** Indicator for zip data */
|
||||||
public static final String ZIP = "zip";
|
public static final String ZIP = "zip";
|
||||||
|
/** Indicator for xml data (store on file system) */
|
||||||
|
public static final String XML = "xml";
|
||||||
|
|
||||||
/** List of Entry Data */
|
/** List of Entry Data */
|
||||||
private ArrayList<MAttachmentEntry> m_items = null;
|
private ArrayList<MAttachmentEntry> m_items = null;
|
||||||
|
@ -789,8 +791,15 @@ public class MAttachment extends X_AD_Attachment
|
||||||
*/
|
*/
|
||||||
protected boolean beforeSave (boolean newRecord)
|
protected boolean beforeSave (boolean newRecord)
|
||||||
{
|
{
|
||||||
if (getTitle() == null || !getTitle().equals(ZIP))
|
if(isStoreAttachmentsOnFileSystem){
|
||||||
|
if (getTitle() == null || !getTitle().equals(XML)) {
|
||||||
|
setTitle (XML);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (getTitle() == null || !getTitle().equals(ZIP)) {
|
||||||
setTitle (ZIP);
|
setTitle (ZIP);
|
||||||
|
}
|
||||||
|
}
|
||||||
return saveLOBData(); // save in BinaryData
|
return saveLOBData(); // save in BinaryData
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue