> For the complete documentation index, see [llms.txt](https://docs.middle.app/middle-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.middle.app/middle-docs/product/apps/upload-scripts.md).

# Upload scripts

Bypass in-browser scripts by uploading your code to Middle

So far, we’ve discussed editing scripts within Browser Mode. However, Middle can also support Upload Mode, which would allow you to upload a package for each individual poll sync or action as needed.

Upload Mode can be useful if you are working with helper packages that are very large, such as Google. Both code packages and Upload Mode count toward AWS Lambda's 250 MB uncompressed limit for the function and its layers.

At the bottom of a script, you can click **Swap To Upload Mode** to access this feature.

<figure><img src="https://lh5.googleusercontent.com/w68Z6lftmfCvTvTo68cbJRXmDEXy0kaELB6zaAZQsRRT0UI0IXlBU1-64q1sKBMb7lO9SaaxxOzPBwnjJdaon5p_3gHJ-Iaft7qYKn8l-P6gs3m2LjbM2xy7tuEMtqUfPpaaH9gqAygvDpMnqkkNL-VmCwkLSVf3Ch9tA_w8gIa78JDkkl7Xy3TdTWJWVg" alt=""><figcaption><p>Swap your app script to upload mode</p></figcaption></figure>

First, **download the compressed script package.** You can then modify the aspects of this folder:

* index.py (**do not edit**)
* app.py (edit this file with your Python script)

<figure><img src="https://lh5.googleusercontent.com/D7L6N7QoeJ2-VkkaOzcPQ9fX4qjcyAII_WmrCqqh5TN6RC_onV-MhAXH67lxEI5XNEZAgPWfu8f8fuVc5E-tWNKO7i1syIuUcJ8fJa0cXog6CGxds2PIc7-5MlvNN3WNak_sfGsQ1b215puZCyAU1BPLbGaYjwLl8arQIOtxQJ9MiYcjK4lnyIS-R8H_zg" alt=""><figcaption><p>Upload your script</p></figcaption></figure>

You can upload any additional files needed to this downloaded script package, and then re-upload the package as a zipped file.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.middle.app/middle-docs/product/apps/upload-scripts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
