Upload the indexx.html file to the server.
339933
function uploadIndexPages(pagePaths, config, options, callback) {
    var requestOptions = {
      method: 'POST',
      url: options.airport + '/dev/' + config.appId + '/simulator',
      form: {}
    };

    // Attach the files as multi-part
    var request = api(config, requestOptions, callback);
    var form = request.form();

    pagePaths.forEach(function(pagePath) {
      grunt.log.debug("Uploading " + pagePath);
      form.append(path.basename(pagePath, '.html'), fs.createReadStream(pagePath));
    });
  }
1267572
function ($placeholder, file, that) {
				$.ajax({
					type: "post",
					url: that.options.imagesUploadScript,
					xhr: function () {
						var xhr = new XMLHttpRequest();
						xhr.upload.onprogress = that.updateProgressBar;
						return xhr;
					},
					cache: false,
					contentType: false,
					complete: function (jqxhr) {
						that.uploadCompleted(jqxhr, $placeholder);
					},
					processData: false,
					data: that.options.formatData(file)
				});
			}
567956
public function setupAdminAjax() {
		add_action('wp_ajax_ilab_upload_prepare', function() {
			$this->prepareUpload();
		});

		add_action('wp_ajax_ilab_upload_import_cloud_file', function() {
			$this->importUploadedFile();
		});

		add_action('wp_ajax_ilab_upload_attachment_info', function() {
			$postId = $_POST['postId'];

			json_response(wp_prepare_attachment_for_js($postId));
		});
	}
457696
def upload():
    

    def twine(*args):
        """ run a twine command """
        process = run(sys.executable, '-m', 'twine', *args)

        return process.wait() != 0

    if run(sys.executable, 'setup.py', 'sdist', 'bdist_wheel').wait() != 0:
        error('failed building packages')

    if twine('register', glob.glob('dist/*')[0]):
        error('register failed')

    if twine('upload', '-s', '-i', 'CB164668', '--skip-existing', 'dist/*'):
        error('upload failed')
100630
public void upload() {
    try {
      writer.flush();
      if (compress)
        zipCompress(filename);
      String remoteName = "failmon-";
      if ("true".equalsIgnoreCase(Environment.getProperty("anonymizer.hash.hostnames")))
        remoteName += Anonymizer.getMD5Hash(InetAddress.getLocalHost().getCanonicalHostName()) + "-";
      else
        remoteName += InetAddress.getLocalHost().getCanonicalHostName() + "-"; 
      remoteName += Calendar.getInstance().getTimeInMillis();//.toString();
      if (compress)
	copyToHDFS(filename + COMPRESSION_SUFFIX, hdfsDir + "/" + remoteName + COMPRESSION_SUFFIX);
      else
	copyToHDFS(filename, hdfsDir + "/" + remoteName);
    } catch (IOException e) {
      e.printStackTrace();
    }

    // delete and re-open
    try {
      fw.close();
      fw = new FileWriter(filename);
      writer = new BufferedWriter(fw);
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
886978
def _add_index_server(self):
        """"""
        index_servers = '\n\t'.join(self.servers.keys())
        self.conf.set('distutils', 'index-servers', index_servers)
801403
def pub_upload(args, location=None, prefix=""):
    
    upload(location, remotes=args, prefix=prefix)
576670
protected void uploadFile() {

        hideOkAndUploadButtons();
        CmsUploader uploader = new CmsUploader();
        CmsFileInfo info = m_fileInput.getFiles()[0];
        info.setOverrideFileName(CmsResource.getName(m_replaceInfo.getSitepath()));
        uploader.uploadFiles(
            CmsCoreProvider.get().link(I_CmsUploadConstants.UPLOAD_ACTION_JSP_URI),
            CmsResource.getFolderPath(m_replaceInfo.getSitepath()),
            false,
            Collections.singletonList(info),
            Collections.<String> emptyList(),
            this);
        showProgress();
    }
799949
def upload_file(self, filepath, overwrite=True):
        """"""
        method = 'POST'
        filename = os.path.split(filepath)[1]
        endpoint = '/rest/v1/storage/{}/{}?overwrite={}'.format(
            self.client.sauce_username, filename, "true" if overwrite else "false")
        with open(filepath, 'rb') as filehandle:
            body = filehandle.read()
        return self.client.request(method, endpoint, body,
                                   content_type='application/octet-stream')
304992
def upgradeUpload(self, file):
        """"""
        files = {'upfile': open(file, 'rb')}
        return self.__post_files('/upgrade/upload',
                                 files=files)
595082
def upload(self, src_file_path, dst_file_name=None):
        """"""
        self._check_session()
        status, data = self._rest.upload_file(
            'files', src_file_path, dst_file_name)
        return data
73574
def post(self, url, content='', files=None, params=None, extra_headers={}, upload_callback=None):
        ''
        if not url.startswith('http'):
            # relative url
            url = self.rootpath + url

        log.debug('posting content (len %s) to url %s', len(content) if content is not None else '?', url)
        headers = self.session.headers.copy()
        headers.update(**extra_headers)

        if not files is None:
            m = requests_toolbelt.MultipartEncoder(fields=files)
            if upload_callback is not None:
                m_len = m.len # compute value for callback closure
                def callback(monitor):
                    upload_callback(monitor, m_len)

                m = requests_toolbelt.MultipartEncoderMonitor(m, callback)
            headers['content-type'] = m.content_type
        else:
            m = content
        url = self.escapeUrl(url)
        r = self.session.post(url, data=m, params=params, headers=headers)
        if not r.ok:
            log.warning('HTTP POST failed: %s', r.text)
            raise JFSError(r.reason)
        return self.getObject(r)
940699
def _upload_file(compute, project_id, file_path, path):
    
    path = "/projects/{}/files/{}".format(project_id, path.replace("\\", "/"))
    with open(file_path, "rb") as f:
        yield from compute.http_query("POST", path, f, timeout=None)
999271
async def _put_chunk(
            cls, session: aiohttp.ClientSession,
            upload_uri: str, buf: bytes):
        """"""
        # Build the correct headers.
        headers = {
            'Content-Type': 'application/octet-stream',
            'Content-Length': '%s' % len(buf),
        }
        credentials = cls._handler.session.credentials
        if credentials is not None:
            utils.sign(upload_uri, headers, credentials)

        # Perform upload of chunk.
        async with await session.put(
                upload_uri, data=buf, headers=headers) as response:
            if response.status != 200:
                content = await response.read()
                request = {
                    "body": buf,
                    "headers": headers,
                    "method": "PUT",
                    "uri": upload_uri,
                }
                raise CallError(request, response, content, None)
925017
def upload(file_path, dataset=None, public=False):
    """"""

    config = ApiConfig()
    client = ApiClient(config.host, config.app_id, config.app_secret)
    return client.upload(file_path, dataset, public)
198347
def upload(ctx):
    """"""
    settings.add_cli_options(ctx.cli_options, settings.TransferAction.Upload)
    ctx.initialize(settings.TransferAction.Upload)
    specs = settings.create_upload_specifications(
        ctx.cli_options, ctx.config)
    del ctx.cli_options
    for spec in specs:
        blobxfer.api.Uploader(
            ctx.general_options, ctx.credentials, spec
        ).start()
7211
def upload(self, *args, **kwargs):
    """"""
    for job in self.jobs:
      job.upload(*args, **kwargs)