Package com.sparc.knappsack.enums

Examples of com.sparc.knappsack.enums.MimeType


    protected final AppFile createAppFile(String path, MultipartFile multipartFile) {
        AppFile file = new AppFile();
        file.setName(multipartFile.getOriginalFilename());

        String contentType = multipartFile.getContentType();
        MimeType mimeType = MimeType.getForFilename(multipartFile.getOriginalFilename());
        if (mimeType != null) {
            contentType = mimeType.getMimeType();
        }
        file.setType(contentType);

        double megabyteSize = multipartFile.getSize() / MEGABYTE_CONVERSION;
        file.setSize(megabyteSize);
View Full Code Here


            log.error("IOException creating ByteArrayInputStream for multipart file: " + multipartFile.getOriginalFilename());
            return false;
        }

        String contentType = multipartFile.getContentType();
        MimeType mimeType = MimeType.getForFilename(multipartFile.getOriginalFilename());
        if (mimeType != null) {
            contentType = mimeType.getMimeType();
        }

        return writeToS3(is, key + multipartFile.getOriginalFilename(), storageConfigurationId, multipartFile.getSize(), contentType);
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.enums.MimeType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.