Package org.apache.openmeetings.util

Examples of org.apache.openmeetings.util.StoredFile


      @Override
      protected void onSubmit(AjaxRequestTarget target) {
        FileUpload fu = fileUploadField.getFileUpload();
        if (fu != null) {
          StoredFile sf = new StoredFile(fu.getClientFileName());
          if (sf.isImage()) {
            boolean asIs = sf.isAsIs();
            try {
              //FIXME need to work with InputStream !!!
              getBean(GenerateImage.class)
                .convertImageUserProfile(fu.writeToTempFile(), userId, asIs);
            } catch (Exception e) {
View Full Code Here


        String newFileSystemName = MD5.do_checksum("FILE_" + d.getTime());

        String newFileExtDot = fileSystemName.substring(dotidx, fileSystemName.length()).toLowerCase();
        String newFileExt = newFileExtDot.substring(1);
        log.debug("newFileExt: " + newFileExt);
        StoredFile storedFile = new StoredFile(newFileSystemName, newFileExt);

        // Check variable to see if this file is a presentation
        // check if this is a a file that can be converted by
        // openoffice-service
        boolean canBeConverted = storedFile.isConvertable();
        boolean isPdf = storedFile.isPdf();
        boolean isImage = storedFile.isImage();
        boolean isChart = storedFile.isChart();
        boolean isAsIs = storedFile.isAsIs();
        boolean isVideo = storedFile.isVideo();

        log.debug("isAsIs: " + isAsIs);

        // add outputfolders for profiles
        // if it is a presenation it will be copied to another place
View Full Code Here

    // trim long names cause cannot output that
    final int MAX_FILE_NAME_LENGTH = 30;
    if (newFileName.length() >= MAX_FILE_NAME_LENGTH) {
      newFileName = newFileName.substring(0, MAX_FILE_NAME_LENGTH);
    }
    StoredFile storedFile = new StoredFile(newFileName, newFileExt);

    // check if this is a a file that can be converted by
    // openoffice-service
    boolean canBeConverted = storedFile.isConvertable();
    boolean isPdf = storedFile.isPdf();
    boolean isImage = storedFile.isImage();
    boolean isAsIs = storedFile.isAsIs();

    File workingDir = null;
    // add outputfolders for profiles
    if (userProfile) {
      // User Profile Update
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.util.StoredFile

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.