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));
}
Aggregations