# 55. Carica file zip (oltre 6 MB)

A causa di una limitazione tecnica del provider cloud AWS, il caricamento di file più grandi di 6 MB deve essere effettuato in 2 passaggi:

#### **1. Richiedere il link pre-firmato per il successivo caricamento diretto.**  <a href="#step1" id="step1"></a>

Come input:&#x20;

* `fileType` - `resa` O `suolo` O `applicato` O `adapt` O `confine`,&#x20;
* `farmUuid` (opzionale) - uuid dell'azienda agricola (azienda/agricoltura) in cui importare il file.&#x20;

Come output:

* `uuid` - l'uuid previsto dopo il caricamento e l'elaborazione,
* `farmUuid` - lo stesso fornito in input,
* `fileType` - lo stesso fornito in input,
* `s3Url` - l'URL utilizzato per caricare il file,
* `s3Fields` - attributi da includere nel form di upload del file.

I dettagli su come usare `s3Url` e `s3Fields` sono descritti nel secondo passaggio.&#x20;

Gli attributi sono validi solo per 60 minuti per il caricamento del file.

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

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

```

{% endcode %}

#### **2. Inviare un file locale a s3Url con gli attributi del form predefiniti presi da 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 %}

Le notifiche sull'elaborazione saranno inviate tramite il meccanismo di sottoscrizione descritto in\
&#x20;[1. Sottoscrizione: Ricevere eventi](/geopard-tutorials/it/documentazione-api/panoramica-delle-richieste-api-geopard/1.-abbonamento-ottieni-eventi.md).

{% hint style="info" %}
L'intestazione della risposta include un `Etag` header, che appare per esempio `Etag: "6fd3e76992738357ab50039f2c60024e"`. Questo valore viene successivamente utilizzato nelle query GraphQL [query getPlatformContext](/geopard-tutorials/it/documentazione-api/panoramica-delle-richieste-api-geopard/83.-query-raccogli-il-contesto-della-piattaforma.md) per monitorare l'avanzamento dell'elaborazione, nonché l'associazione con le entità "Field", "AsAppliedDataset", "YieldDataset" e "SoilDataset".
{% endhint %}

{% hint style="info" %}
Usa `‘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/it/documentazione-api/panoramica-delle-richieste-api-geopard/55.-carica-file-zip-oltre-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.
