|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.ui.web.util.files.FileUtils
public class FileUtils
Method Summary | |
---|---|
static Blob |
createSerializableBlob(java.io.InputStream file,
java.lang.String filename,
java.lang.String mimeType)
Creates a serializable blob from a stream, with filename and mimetype detection. |
static java.lang.String |
getCleanFileName(java.lang.String filename)
Returns a clean filename, stripping upload path on client side. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Blob createSerializableBlob(java.io.InputStream file, java.lang.String filename, java.lang.String mimeType)
Creates an in-memory blob if data is under 64K, otherwise constructs a serializable FileBlob which stores data in a temporary file on the hard disk.
file
- the input stream holding datafilename
- the file name. Will be set on the blob and will used for
mimetype detection.mimeType
- the detected mimetype at upload. Can be null. Will be
verified by the mimetype service.public static java.lang.String getCleanFileName(java.lang.String filename)
Fixes NXP-544
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |