Examples of Upload


Examples of org.gradle.api.tasks.Upload

    protected void setDefaultMavenDescriptor() {
        // Flag to publish the Maven POM, but no pom file inputted, activate default Maven install.
        // if the project doesn't have the maven install task, warn
        Project project = getProject();
        TaskContainer tasks = project.getTasks();
        Upload installTask = tasks.withType(Upload.class).findByName("install");
        if (installTask == null) {
            log.warn("Cannot publish pom for project '{}' since it does not contain the Maven " +
                    "plugin install task and task '{}' does not specify a custom pom path.",
                    new Object[]{project.getPath(), getPath()});
            mavenDescriptor = null;
View Full Code Here

Examples of org.zkoss.zss.ui.impl.Upload

   
    _spreadsheet.addEventListener(Events.ON_CELL_DOUBLE_CLICK, _doClearClipboard);
    _spreadsheet.addEventListener(Events.ON_START_EDITING, _doClearClipboard);
   
    if (_upload == null) {
      _upload = new Upload();
      _upload.appendChild(_insertPicture = new Uploader());
      _insertPicture.addEventListener(org.zkoss.zk.ui.event.Events.ON_UPLOAD, new EventListener() {
       
        @Override
        public void onEvent(Event event) throws Exception {
View Full Code Here

Examples of xnap.plugin.nap.net.Upload

  if (NapPreferences.getInstance().getWhoisQueryOnTransfer()) {
      server.getUser(nick).update(true);
  }

  File file = NapFileHelper.getRepositoryFile(filename);
  Upload u = new Upload(nick, file, server, filename);
 
//    if (file == null || !server.getUser(nick).isAllowedToDownload()) {
//        logger.warn("rejecting leecher / invalid request: " + nick + " "
//        + filename);
//        u.reject();
//        return;

  if (file == null) {
        logger.warn("invalid request: " + nick + " " + filename);
        u.reject();
        return;
  }
 
  if (!server.getUser(nick).isAllowedToDownload()) {
        logger.warn("rejecting leecher" + nick + " " + filename);
        u.reject();
        return;
  }
 
  UploadQueue uq = UploadQueue.getInstance();
  logger.debug("upload: " + nick + " " + filename);

  boolean added = uq.add(u);
  if (added) {
      // give the download queue a chance to start the download
      // right away to avoid sending local queued responses
      try {
    Thread.currentThread().sleep(20);
      }
      catch (InterruptedException e) {
      }
  }

  int pos = uq.getLocalQueuePos(u);
  if (pos == -1 && !added) {
      if (uq.isRunning(u)) {
    // some clients need two confirmations before they start
    // downloading
    MessageHandler.send
        (server, new UploadAckMessage(nick, filename));
      }
      else {
    logger.warn("upload queue rejected " + filename);
    u.reject();
      }
  }
  else if (pos != -1) {
      // pos == 0 means busy, so we always send pos > 0
      QueueLimitMessage m = new QueueLimitMessage(nick, filename,
View Full Code Here

Examples of zendeskapi.models.shared.Upload

  public Upload uploadAttachments(List<ZendeskFile> files) throws ZendeskApiException {
    if (files.isEmpty()) {
      return null;
    }

    Upload res = null;
    for (ZendeskFile file : files) {
      if (res != null) {
        res = uploadAttachment(file, res.getToken());
      } else {
        res = uploadAttachment(file);
      }
    }
   
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.