Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Using fineuploader S3 cross-device #2050

@tychovbh

Description

@tychovbh

Type of issue

  • Bug report
  • Feature request

Uploader type

  • Traditional
  • S3
  • Azure
I'm creating a cross-device application. I'm using react-native web to build a web and native application sharing code.

I almost nailed it using the fine-uploader to upload a video to S3 using the fine-uploader library. But unfortunately I couldn't get it to work for native.

I got it to work in Reactjs using the basic uploader without the dropzone you provide, because of react-native doesn't use html and css. Here is my example:

import qq from 'fine-uploader/lib/core/s3'

let file = event.target.files[0]
let uploader = new qq.s3.FineUploaderBasic({
    request: {
        endpoint: 'endpoint',
            accessKey: 'accessKey'
        },
         ...
});

uploader.addFiles({name: file.name, blob: file});

Amazing how easy this was. i'm retrieving the file via a file input. On react native I use Expo ImagePicker.

The FineUploaderBasic is perfect, but it lives in the same file which uses code for the Element (which i don't need). This code contains document.createElement("input"), navigator.userAgent and probably more code which is not available in react-native. So when I import fine-uploader/lib/core/s3I get errors like Can't find document.

Is it possible that the FineUploaderBasic would live in it's own file? So you can import it separate like:
import FineUploaderBasic from 'fine-uploader/lib/core/s3/FineUploaderBasic'

Feature request details

react-native-web is really cool, sharing almost all your code over native and web. Probably more people would like to upload videos to S3 easily via the fineuploader library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions