filestack-react icon indicating copy to clipboard operation
filestack-react copied to clipboard

React 18 support

Open adboio opened this issue 2 years ago • 6 comments

It looks like this module only supports React 16, but we're on v18 now. Can we expect React 18 support soon?

adboio avatar Mar 07 '23 04:03 adboio

Filestack seems to be going out of business. We switched to UploadCare

KayakinCoder avatar Mar 29 '23 23:03 KayakinCoder

Really? Going out of business?

Wamy-Dev avatar May 23 '23 02:05 Wamy-Dev

Unless that is insider info, no I don’t think so.

On Mon, May 22, 2023 at 7:37 PM David @.***> wrote:

Really? Going out of business?

— Reply to this email directly, view it on GitHub https://github.com/filestack/filestack-react/issues/132#issuecomment-1558414677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJCBACYBT5OC7WKYXERQ3XHQPHBANCNFSM6AAAAAAVR6Q4AI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

phlare avatar May 23 '23 04:05 phlare

No commits to main since Sept. 2021. We switched to Uploadcare. It's kind of amazing that a company named _File_stack doesn't update their primary file uploader for years on end

KayakinCoder avatar Sep 07 '23 00:09 KayakinCoder

This is unmaintained, switching to Uppy (they have a much more sane react implementation than uploadcare).

Californian avatar Sep 08 '23 05:09 Californian

As for me the best way do not use the FileStack as React component. I have used the common JS library JavaScript SDK in my React app

JavaScript File Picker Doc

I created a simple hook for my needs and it works well

import * as filestack from 'filestack-js'
import './picker.css'

function useFileUploader(options: filestack.PickerOptions) {
    const initialOptions = {
        fromSources: ['local_file_system'],
        maxSize: 3024000,
        maxFiles: 1,
        minFiles: 1,
        uploadInBackground: true,
        onClose: () => picker.close(),
        onCancel: () => picker.close(),
    }

    const client = filestack.init(FILE_STACK_API_KEY)
    const picker = client.picker({ ...initialOptions, ...options })
    
    /* ... */
    
    return {
        picker
        /* ... */
    }
}

Use useFileUploader in another component

const UploadFile: React.FC = () => {
    const { picker } = useFileUploader({
        accept: ['image/*'],
        transformations: {
            crop: true,
            rotate: true,
        },
        onUploadDone: (result) => onUploadDone(result),
    })

    /**
     * Handle a success uploading result
     *
     * @param result
     */
    const onUploadDone = async (result) => {
        picker.close()
        /* ... */
    }
    
    return (<button onClick={() => picker.open()}>Add</button>)
}

Uninstall and forget about this repository 🙂

ivantokar avatar Sep 25 '23 11:09 ivantokar