Package er.attachment.model

Examples of er.attachment.model.ERS3Attachment


    }
    if (keyTemplate == null) {
      keyTemplate = "${pk}${ext}";
    }

    ERS3Attachment attachment = ERS3Attachment.createERS3Attachment(
        editingContext, Boolean.FALSE, new NSTimestamp(), mimeType,
        recommendedFileName, proxy,
        Integer.valueOf((int) uploadedFile.length()), null);
    if (delegate() != null) {
      delegate().attachmentCreated(this, attachment);
    }
    try {
      String key = ERAttachmentProcessor._parsePathTemplate(attachment,
          keyTemplate, recommendedFileName);

      attachment.setS3Location(bucket, key);
      attachment.setConfigurationName(configurationName);
      String s3Path = attachment.queryStringAuthGenerator().makeBareURL(
          bucket, key);
      attachment.setS3Path(s3Path);

      attachment._setPendingUploadFile(uploadedFile, pendingDelete);

    } catch (RuntimeException e) {
      attachment.delete();
      if (pendingDelete) {
        uploadedFile.delete();
      }
      throw e;
    }
View Full Code Here

TOP

Related Classes of er.attachment.model.ERS3Attachment

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.