An open API service indexing awesome lists of open source software.

https://github.com/geminidsystems/react-native-quicklook-view

Preview files using QuickLook in react-native. Support for local files via base64 and downloadable files
https://github.com/geminidsystems/react-native-quicklook-view

document file image preview quicklook react-native

Last synced: 8 months ago
JSON representation

Preview files using QuickLook in react-native. Support for local files via base64 and downloadable files

Awesome Lists containing this project

README

          

# react-native-quicklook-view

## Supported Versions
| react-native-select-attachment | react-native |
| --- | --- |
| >= 0.0.1 | 0.60+

## Description
`react-native-quicklook-view` allows you to preview images, documents, and other files through BASE64 or file paths, or a URL.

## Getting Started

`$ npm install react-native-select-attachment --save`

#### Android
Not supported in the current release, check back for future releases or create a PR

#### iOS
CocoaPods on iOS needs this extra step

```
$ npx pod-install
```

## Usage
To import into your react app, import the SelectAttachmentButton component.
```javascript
import QuickLookView from 'react-native-quicklook-view';
```
##### Download Example
```javascript

```

##### Base64 Example
```javascript

```

# Reference

## Properties

### `fileID`

A unique identifier for the file

| Type | Required | Default |
| -------- | -------- | -------- |
| String | Yes | None |

---

### `fileSource`

The source of the file. Valid values include:

- DOWNLOAD
- BASE64

| Type | Required | Default |
| -------- | -------- | ----- |
| [String] | Yes | None |

---

### `url`

The URL of the file. This is used only is `fileSource` is set to `DOWNLOAD`

| Type | Required | Default |
| -------- | -------- | ----- |
| String | No | None |

---

### `fileData`

Base64 encoded String of the file data. This is used only if `fileSource` is set to `BASE64`

| Type | Required | Default |
| -------- | -------- | -------- |
| String | No | None |

---

### `fileType`

The file type for Base64 encoded string. Example "png" or "pdf"

| Type | Required | Default |
| -------- | -------- | -------- |
| String | No | false |

---

### `width`

The width of the QuickLook view

| Type | Required | Default |
| -------- | -------- | -------- |
| Integer | No | Dimensions.get('window').width |

---

### `height`

The height of the QuickLook view

| Type | Required | Default |
| -------- | -------- | -------- |
| Integer | No | Dimensions.get('window').height |

---