Package ca.carleton.gcrc.couch.onUpload.conversion

Examples of ca.carleton.gcrc.couch.onUpload.conversion.FileConversionContext.downloadFile()


        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here


        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here

  public void orientImage(AttachmentDescriptor attDescription) throws Exception {
    // Get file
    FileConversionContext conversionContext = attDescription.getContext();
    String mimeType = attDescription.getContentType();
    File outputFile = File.createTempFile("original_", attDescription.getMediaFileName());
    conversionContext.downloadFile(attDescription.getAttachmentName(), outputFile);
   
    ImageMagickProcessor imp = ImageMagick.getInfo().getProcessor();
    ImageInfo imageInfo = imp.getImageInfo(outputFile);
   
    if( imageInfo.orientation == ImageInfo.Orientation.REQUIRES_CONVERSION ){
View Full Code Here

    // Get file
    DocumentDescriptor docDescriptor = attDescription.getDocumentDescriptor();
    FileConversionContext conversionContext = attDescription.getContext();
    String mimeType = attDescription.getContentType();
    File inFile = File.createTempFile("original_", attDescription.getMediaFileName());
    conversionContext.downloadFile(attDescription.getAttachmentName(), inFile);

    File outFile = File.createTempFile("thumb_", attDescription.getMediaFileName());
   
    // Perform thumbnail
    MultimediaConversionRequest request = new MultimediaConversionRequest();
View Full Code Here

        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here

        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(attachmentName, outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here

        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here

        throw new Exception("Invalid state. A file must be present for submitted_inline");
      }
     
      // Download file
      File outputFile = File.createTempFile("inline", "", mediaDir);
      conversionContext.downloadFile(outputFile);
     
      // Create an original structure to point to the file in the
      // media dir. This way, when we go to "submitted" state, we will
      // be ready.
      OriginalFileDescriptor originalDescription = attDescription.getOriginalFileDescription();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.