|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
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(InputStream file,
String filename,
String mimeType)
Creates a serializable blob from a stream, with filename and mimetype detection. |
static String |
getCleanFileName(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(InputStream file, String filename, 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 String getCleanFileName(String filename)
Fixes NXP-544
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |