Важно

Translation is a community effort you can join. This page is currently translated at 34.62%.

28.1.4. File tools

28.1.4.1. Download file

Downloads a file specified using a URL (using for instance http: or file:). In other words you can copy/paste a URL and download the file.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

URL

URL

[string]

The URL of the file to download.

File destination

Optional

OUTPUT

[string]

По умолчанию: [Сохранить во временный файл]

Specification of the file destination. One of:

  • Skip Output

  • Сохранить во временный файл

  • Save to File…

Advanced parameters

Ярлык

Имя

Тип

Описание

Method

METHOD

[enumeration]

Default: 0

The HTTP method to use for the request. Options are:

  • 0 — GET

  • 1 — POST

Data

Optional

DATA

[string]

The data to add in the body if the request is a POST.

Результаты

Ярлык

Имя

Тип

Описание

File destination

OUTPUT

[string]

The location of the downloaded file

Код на Python

Algorithm ID: qgis:filedownloader

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.