# 55. Augšupielādēt zip failus (virs 6 MB)

Kā AWS mākoņpakalpojumu sniedzēja tehniskais ierobežojums, failu augšupielāde, kas lielāka par 6 MB, jāveic 2 soļos:

#### **1. Pieprasīt iepriekš parakstītu saiti turpmākai tiešai augšupielādei.**  <a href="#step1" id="step1"></a>

Kā ievade:&#x20;

* `fileType` - `raža` VAI `augsne` VAI `lietotā` VAI `adapt` VAI `robeža`,&#x20;
* `farmUuid` (pēc izvēles) - saimniecības UUID, kurā importēt failu.&#x20;

Kā izvade:

* `uuid` - gaidāmais UUID pēc augšupielādes un apstrādes,
* `farmUuid` - tas pats, kas ievadē,
* `fileType` - tas pats, kas ievadē,
* `s3Url` - URL, ko izmanto faila augšupielādei,
* `s3Fields` - atribūti, kas jānodod augšupielādes faila formā.

Sīkāka informācija par to, kā lietot `s3Url` un `s3Fields` ir aprakstīta otrajā solī.&#x20;

Atribūti ir derīgi tikai 60 minūtes faila augšupielādei.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
mutācija GeneratePresignedPostFileData {
  generatePresignedPostFileData(input:{
    fileType: applied
    farmUuid: "8bba5132-3a92-4ce1-8699-220e78ad68bd"
  } ) {
    uuid
    farmUuid
    fileType
    s3Url
    s3Fields
  }
}

```

{% endcode %}

#### **2. Nosūtīt lokālu failu uz s3Url ar iepriekš noteiktiem formas atribūtiem no s3Fields.**  <a href="#step2" id="step2"></a>

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl --location --request POST '<s3Url>' \
--form 'key="<value_in_s3Fields>"' \
--form 'AWSAccessKeyId="<value_in_s3Fields>"' \
--form 'x-amz-security-token="<value_in_s3Fields>"' \
--form 'policy="<value_in_s3Fields>"' \
--form 'signature="<value_in_s3Fields>"' \
--form 'file=@"<local_file_path>"'
```

{% endcode %}

Paziņojumi par apstrādi tiks piegādāti, izmantojot abonēšanas mehānismu, kas aprakstīts\
&#x20;[1. Abonēšana: Saņemt notikumus](/geopard-tutorials/lva/api-dokumentacija/geopard-api-pieprasijumu-parskats/1.-abonements-iegut-notikumus.md).

{% hint style="info" %}
Atbildes galvene iekļauj `Etag` galveni, kas parādās, piemēram, `Etag: "6fd3e76992738357ab50039f2c60024e"`. Šī vērtība pēc tam tiek izmantota GraphQL [vaicājumā getPlatformContext](/geopard-tutorials/lva/api-dokumentacija/geopard-api-pieprasijumu-parskats/83.-vaicajums-iegut-platformas-kontekstu.md) lai uzraudzītu apstrādes gaitu, kā arī sasaisti ar "Field", "AsAppliedDataset", "YieldDataset" un "SoilDataset" entītijām.
{% endhint %}

{% hint style="info" %}
Izmantojiet `‘Accept-Encoding’:’gzip, deflate, br’`.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geopard.tech/geopard-tutorials/lva/api-dokumentacija/geopard-api-pieprasijumu-parskats/55.-augsupieladet-zip-failus-virs-6-mb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
