mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
Fix to issue with file encoding/mimetype not being set on file upload
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7267 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
3e65d317a7
commit
ae37e5c139
@ -1211,7 +1211,10 @@ public class ScriptNode implements Serializable, Scopeable
|
|||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
return newInstance(fileInfo.getNodeRef(), this.services, this.scope);
|
ScriptNode file = newInstance(fileInfo.getNodeRef(), this.services, this.scope);
|
||||||
|
file.setMimetype(this.services.getMimetypeService().guessMimetype(name));
|
||||||
|
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2370,6 +2373,15 @@ public class ScriptNode implements Serializable, Scopeable
|
|||||||
return contentData.getEncoding();
|
return contentData.getEncoding();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEncoding(String encoding)
|
||||||
|
{
|
||||||
|
this.contentData = ContentData.setEncoding(this.contentData, encoding);
|
||||||
|
services.getNodeService().setProperty(nodeRef, this.property, this.contentData);
|
||||||
|
|
||||||
|
// update cached variables after putContent()
|
||||||
|
this.contentData = (ContentData) services.getNodeService().getProperty(nodeRef, this.property);
|
||||||
|
}
|
||||||
|
|
||||||
public void setMimetype(String mimetype)
|
public void setMimetype(String mimetype)
|
||||||
{
|
{
|
||||||
this.contentData = ContentData.setMimetype(this.contentData, mimetype);
|
this.contentData = ContentData.setMimetype(this.contentData, mimetype);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user