# Share Media/Files

* [Bubble.io Plugin](#bubble.io-plugin)
* [JavaScript SDK](#javascript-sdk)

### 🧋 Bubble.io Plugin

#### \[Action] Natively - Share

* Type - text, image, text and image or file
* Image Url
* Text or Url
* File Url

First of all, specify a type if you want to share just a URL, select **Type** (text), and provide a URL in the **Text or Url** field.

Same for Text/Url + Image. Selecting a **Type** (both) and filling a **Text or Url** and **Image Url** fields.

For files, you need to select **Type** (file), and provide a URL in the **File url** field

### 🛠 JavaScript SDK

#### Share Image

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

```javascript
const imageUrl = "https://awik.io/wp-content/uploads/2018/06/unsplash.jpg";
window.natively.shareImage(imageUrl);
```

{% endcode %}

#### Share Text

{% code lineNumbers="true" %}

```javascript
const text = "Text for sharing";
window.natively.shareText(text);
```

{% endcode %}

#### Share Text & Image

{% code lineNumbers="true" %}

```javascript
const text = "Text for sharing";
const imageUrl = "https://awik.io/wp-content/uploads/2018/06/unsplash.jpg";
window.natively.shareTextAndImage(text, imageUrl);
```

{% endcode %}

#### Share File

{% code lineNumbers="true" %}

```javascript
const fileUrl = "http://www.africau.edu/images/default/sample.pdf";
window.natively.shareFile(fileUrl);
```

{% endcode %}


---

# 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.buildnatively.com/guides/integration/share-media-files.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.
