Examples of Upload


Examples of com.amazonaws.services.s3.transfer.Upload

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Multipart sending object to S3 using PutObjectRequest");
        }
        TransferManager tm = new TransferManager(S3Utils.acquireClient(clientOptions));
        Upload upload = tm.upload(req);
        upload.waitForCompletion();

    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.Upload

  }

  private static boolean upload(AmazonS3 s3, String bucketName, String destinationFile, File source)
  {
    TransferManager mgr = new TransferManager(s3);
    Upload upload = mgr.upload(bucketName, destinationFile, source);

    try {
      upload.waitForUploadResult();
    } catch (InterruptedException e) {
      return false;
    }

    return true;
View Full Code Here

Examples of com.bj58.argo.client.Upload

            if (part == null)
                continue;
            MultiPartInputStreamParser.MultiPart mp = (MultiPartInputStreamParser.MultiPart) part;

            Upload upload = wrapPart(part, mp.getContentDispositionFilename());

            originPartMultiMapBuilder.put(part.getName(), upload);


View Full Code Here

Examples of com.cloud.storage.Upload

    public void execute(){
        try {
            UserContext.current().setEventDetails("Volume Id: "+getId());
            Long uploadId = _mgr.extractVolume(this);
            if (uploadId != null){
                Upload uploadInfo = _entityMgr.findById(Upload.class, uploadId);
                ExtractResponse response = new ExtractResponse();
                response.setResponseName(getCommandName());
                response.setObjectName("volume");
                response.setIdentityTableName("volumes");
                response.setId(id);
                response.setName(_entityMgr.findById(Volume.class, id).getName());       
                response.setZoneId(zoneId);
                response.setZoneName(_entityMgr.findById(DataCenter.class, zoneId).getName());
                response.setMode(mode);
                response.setUploadId(uploadId);
                response.setState(uploadInfo.getUploadState().toString());
                response.setAccountId(getEntityOwnerId());       
                response.setUrl(uploadInfo.getUploadUrl());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to extract volume");
            }
        } catch (URISyntaxException ex) {
View Full Code Here

Examples of com.cloud.storage.Upload

    public void execute(){
        try {
            UserContext.current().setEventDetails("Volume Id: "+getId());
            Long uploadId = _mgr.extractVolume(this);
            if (uploadId != null){
                Upload uploadInfo = _entityMgr.findById(Upload.class, uploadId);
                ExtractResponse response = new ExtractResponse();
                response.setResponseName(getCommandName());
                response.setObjectName("volume");
                Volume vol = _entityMgr.findById(Volume.class, id);
                response.setId(vol.getUuid());
                response.setName(vol.getName());
                DataCenter zone = _entityMgr.findById(DataCenter.class, zoneId);
                response.setZoneId(zone.getUuid());
                response.setZoneName(zone.getName());
                response.setMode(mode);
                response.setUploadId(uploadInfo.getUuid());
                response.setState(uploadInfo.getUploadState().toString());
                Account account = _entityMgr.findById(Account.class, getEntityOwnerId());
                response.setAccountId(account.getUuid());
                response.setUrl(uploadInfo.getUploadUrl());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract volume");
            }
        } catch (URISyntaxException ex) {
View Full Code Here

Examples of com.google.api.services.androidpublisher.AndroidPublisher.Edits.Apks.Upload

            final String apkPath = BasicUploadApk.class
                    .getResource(ApplicationConfig.APK_FILE_PATH)
                    .toURI().getPath();
            final AbstractInputStreamContent apkFile =
                    new FileContent(AndroidPublisherHelper.MIME_TYPE_APK, new File(apkPath));
            Upload uploadRequest = edits
                    .apks()
                    .upload(ApplicationConfig.PACKAGE_NAME,
                            editId,
                            apkFile);
            Apk apk = uploadRequest.execute();
            log.info(String.format("Version code %d has been uploaded",
                    apk.getVersionCode()));

            // Assign apk to alpha track.
            List<Integer> apkVersionCodes = new ArrayList<>();
View Full Code Here

Examples of com.google.api.services.androidpublisher.AndroidPublisher.Edits.Apks.Upload

            final String apkPath = UploadApkWithListing.class
                    .getResource(ApplicationConfig.APK_FILE_PATH)
                    .toURI().getPath();
            final AbstractInputStreamContent apkFile =
                    new FileContent(AndroidPublisherHelper.MIME_TYPE_APK, new File(apkPath));
            Upload uploadRequest = edits
                    .apks()
                    .upload(ApplicationConfig.PACKAGE_NAME,
                            editId,
                            apkFile);
            Apk apk = uploadRequest.execute();
            log.info(String.format("Version code %d has been uploaded",
                    apk.getVersionCode()));

            // Assign apk to beta track.
            List<Integer> apkVersionCodes = new ArrayList<>();
View Full Code Here

Examples of com.google.api.services.androidpublisher.AndroidPublisher.Edits.Apks.Upload

      // Upload new apk to developer console
      final AbstractInputStreamContent apkFileContent =
          new FileContent(AndroidPublisherHelper.MIME_TYPE_APK,
              getReleaseApkFile(publisherExtension));
      Upload uploadRequest = edits
          .apks()
          .upload(publisherExtension.getPackageName(),
              editId,
              apkFileContent);
      Apk apk = uploadRequest.execute();
      getLogger().info(String.format("Version code %d has been uploaded",
          apk.getVersionCode()));

      // Assign apk to alpha track.
      List<Integer> apkVersionCodes = new ArrayList<Integer>();
View Full Code Here

Examples of com.sishuok.es.showcase.upload.entity.Upload

    @RequiresPermissions("showcase:upload:create")
    @RequestMapping(value = "create", method = RequestMethod.GET)
    public String showCreateForm(Model model) {
        model.addAttribute(Constants.OP_NAME, "新增");
        if (!model.containsAttribute("upload")) {
            model.addAttribute("upload", new Upload());
        }
        return "showcase/upload/ajax/editForm";
    }
View Full Code Here

Examples of com.vaadin.ui.Upload

        PasswordField password = new PasswordField("Password");
        password.setInputPrompt("Password");
        form.addComponent(password);

        Upload upload = new Upload("File input", null);
        form.addComponent(upload);

        Label help = new Label("Example block-level help text here.");
        help.addStyleName("help-block");
        form.addComponent(help);
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.