Search in sources :

Example 1 with FileManager

use of io.vertigo.dynamo.file.FileManager in project vertigo by KleeGroup.

the class VFileUtil method createVFile.

private static VFile createVFile(final Part file) {
    final String fileName = getSubmittedFileName(file);
    String mimeType = file.getContentType();
    if (mimeType == null) {
        mimeType = "application/octet-stream";
    }
    final FileManager fileManager = Home.getApp().getComponentSpace().resolve(FileManager.class);
    return fileManager.createFile(fileName, mimeType, new Date(), file.getSize(), new FileInputStreamBuilder(file));
}
Also used : FileManager(io.vertigo.dynamo.file.FileManager) Date(java.util.Date)

Aggregations

FileManager (io.vertigo.dynamo.file.FileManager)1 Date (java.util.Date)1