Add all uploaded files (across all image styles) to the queuedForDeletion queue.
967949
protected function queueAllForDeletion()
    {
        // If no file is currently stored, don't delete anything.
        if ( ! $this->originalFilename()) {
            return;
        }

        $this->deleteTarget    = $this->makeTargetInstanceWithCurrentData();
        $this->queuedForDelete = array_unique(array_merge($this->queuedForDelete, $this->variants(true)));
    }
798089
function (e, data) {
                var that = $(this).data('blueimp-fileupload') ||
                        $(this).data('fileupload'),
                    getFilesFromResponse = data.getFilesFromResponse ||
                        that.options.getFilesFromResponse,
                    files = getFilesFromResponse(data),
                    template,
                    deferred;
                if (data.context) {
                    data.context.each(function (index) {
                        var file = files[index] ||
                                {error: 'Empty file upload result'},
                            deferred = that._addFinishedDeferreds();
                        that._transition($(this)).done(
                            function () {
                                var node = $(this);
                                template = that._renderDownload([file])
                                    .replaceAll(node);
                                that._forceReflow(template);
                                that._transition(template).done(
                                    function () {
                                        data.context = $(this);
                                        that._trigger('completed', e, data);
                                        that._trigger('finished', e, data);
                                        deferred.resolve();
                                    }
                                );
                            }
                        );
                    });
                } else {
                    template = that._renderDownload(files)
                        .appendTo(that.options.filesContainer);
                    that._forceReflow(template);
                    deferred = that._addFinishedDeferreds();
                    that._transition(template).done(
                        function () {
                            data.context = $(this);
                            that._trigger('completed', e, data);
                            that._trigger('finished', e, data);
                            deferred.resolve();
                        }
                    );
                }
            }
681541
function addFiles(pattern, cb){
    glob(pattern, function(err, files){
      if(err) throw err;

      async.each(files, readFile, function(err){
        if(err) throw err;
        if(cb) cb();
      });
    });
  }
1338709
def upload_files(self, container, src_dst_map, content_type=None):
        """"""
        if not content_type:
            content_type = "application/octet.stream"
        url = self.make_url(container, None, None)
        headers = self._base_headers
        multi_files = []
        try:
            for src_path in src_dst_map:
                dst_name = src_dst_map[src_path]
                if not dst_name:
                    dst_name = os.path.basename(src_path)
                multi_files.append(
                    ('files', (dst_name, open(src_path, 'rb'), content_type)))

            rsp = requests.post(url, headers=headers, files=multi_files,
                                timeout=self._timeout)
        except requests.exceptions.ConnectionError as e:
            RestHttp._raise_conn_error(e)
        finally:
            for n, info in multi_files:
                dst, f, ctype = info
                f.close()

        return self._handle_response(rsp)
1085290
def put_files(self, files, content_type=None, compress=None, cache_control=None, block=True):
    
    def base_uploadfn(path, content, interface):
      interface.put_file(path, content, content_type, compress, cache_control=cache_control)

    for path, content in files:
      content = compression.compress(content, method=compress)
      uploadfn = partial(base_uploadfn, path, content)

      if len(self._threads):
        self.put(uploadfn)
      else:
        uploadfn(self._interface)

    if block:
      desc = 'Uploading' if self.progress else None
      self.wait(desc)

    return self
121288
protected function clearUploadedAtTemp()
    {
        foreach ($this->move_uploaded_queue as $key => $queue_item) {
            if (is_array($queue_item) && isset($queue_item['tmp_name'])) {
                if (is_file($queue_item['tmp_name']) && is_writable($queue_item['tmp_name'])) {
                    unlink($queue_item['tmp_name']);
                }
            }
        }// endforeach;
        unset($key, $queue_item);
        $this->move_uploaded_queue = array();
    }
821490
async function _uploadFiles(dir, presignedPosts) {
  const promises = [];
  const limit = pLimit(5);
  let uploaded = false;

  Object.keys(presignedPosts).forEach(async (path) => {
    const { post } = presignedPosts[path];

    if (!post) {
      Logger.tagged('exists', path, 'blue');
    } else {
      const filePath = resolve(dir, path);
      const form = new FormData();

      Utils.forEach(post.fields, (value, key) => { form.append(key, value); });
      form.append('file', fs.createReadStream(filePath));

      const promise = limit(() => got.post(post.url, { body: form }).then(() => {
        Logger.tagged('upload', path);
      }));

      promises.push(promise);
      uploaded = true;
    }
  });

  await Promise.all(promises);
  return uploaded;
}
1206525
private void submitQueuedUploadsToS3() {
        if (mUploadQueue == null) return;
        for (Pair<String, File> pair : mUploadQueue) {
            submitUpload(pair.first, pair.second);
        }
    }
362634
private void insertDefaultDifferentialListServers()
    {
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m1.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://m2.picn.de/f/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://download10.onlinetvrecorder.com/mediathekview/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://mediathekview.jankal.me/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler1.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler2.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
        listeFilmlistenUrls_diff.add(new DatenFilmlisteUrl("http://verteiler3.mediathekview.de/Filmliste-diff.xz", DatenFilmlisteUrl.SERVER_ART_DIFF));
    }
868261
function ($placeholder, files, that) {
			var acceptedTypes = {
				'image/png': true,
				'image/jpeg': true,
				'image/gif': true
			};

			for (var i = 0; i < files.length; i++) {
				var file = files[i];

				if (acceptedTypes[file.type] === true) {
					$placeholder.append('<progress class="progress" min="0" max="100" value="0">0</progress>');

					that.uploadFile($placeholder, file, that);
				}
			}
		}
564368
function _addSearchResultsForEntries(entries) {
            var fullPaths = [];
            return Async.doInParallel(entries, function (entry) {
                var addedFiles = [],
                    addedFilePaths = [],
                    deferred = new $.Deferred();

                // gather up added files
                var visitor = function (child) {
                    // Replicate filtering that getAllFiles() does
                    if (ProjectManager.shouldShow(child)) {
                        if (child.isFile && _isReadableText(child.name)) {
                            // Re-check the filtering that the initial search applied
                            if (_inSearchScope(child)) {
                                addedFiles.push(child);
                                addedFilePaths.push(child.fullPath);
                            }
                        }
                        return true;
                    }
                    return false;
                };

                entry.visit(visitor, function (err) {
                    if (err) {
                        deferred.reject(err);
                        return;
                    }

                    //node Search : inform node about the file changes
                    //filesChanged(addedFilePaths);
                    fullPaths = fullPaths.concat(addedFilePaths);

                    if (findOrReplaceInProgress) {
                        // find additional matches in all added files
                        Async.doInParallel(addedFiles, function (file) {
                            return _doSearchInOneFile(file)
                                .done(function (foundMatches) {
                                    resultsChanged = resultsChanged || foundMatches;
                                });
                        }).always(deferred.resolve);
                    } else {
                        deferred.resolve();
                    }
                });

                return deferred.promise();
            }).always(function () {
                // this should be called once with a large array instead of numerous calls with single items
                filesChanged(fullPaths);
            });
        }
42825
public static void populateFilesList(File dir, List<File> filesListInDir) {
		File[] files = dir.listFiles();
		for(File file : files){
			if(file.isFile()){
				filesListInDir.add(file);
			}else{
				populateFilesList(file, filesListInDir);
			}
		}
	}
925916
private function appendCollectedFileAndChanges(): void
    {
        if (!empty($this->currentFile)) {
            foreach ($this->currentChanges as $change) {
                $this->currentFile->addChange($change);
            }
            $this->files[] = $this->currentFile;
        }
        $this->currentChanges = [];
    }
1148868
async function add(files) {
	const shell = await execa('git', ['add', '--ignore-errors'].concat(files), {reject: false});
	debug('add file to git index', shell);
}
22826
def file_add_types(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addTypes' % object_id, input_params, always_retry=always_retry, **kwargs)
1147650
function addToQueueCopy(sources, dest, options) {
      if(sources.length === 1) {
        // Simple copy
        queueCopy.push({
          src:      sources[0],
          dest:     dest,
          options:  _.extend({}, options, { realDest: dest, isConcat: false })
        });
      } else {
        // Concat
        sources.forEach(function(src) {

          var def       = Q.defer();
          var cacheDest = join(options.cache, fileUID(src));

          if(!concatPromises[dest]) {
            concatPromises[dest] = [];
          }
          concatPromises[dest].push(def.promise);

          if(!concatSources[dest]) {
            concatSources[dest] = [];
          }
          concatSources[dest].push(cacheDest);

          queueCopy.push({
            src:      src,
            dest:     cacheDest,
            options:  _.extend({}, options, { realDest: dest, isConcat: true })
          }, function(err, changed) {
            if(err) {
              return def.reject(err);
            }
            def.resolve(changed);
          });
        });
      }
    }
182330
def add_image(self, im):
        
        for im_tmp in self.images:
            if im_tmp.kind == im.kind:
                self.images.remove(im_tmp)
                break
        self.images.append(im)