React 18 support
It looks like this module only supports React 16, but we're on v18 now. Can we expect React 18 support soon?
Filestack seems to be going out of business. We switched to UploadCare
Really? Going out of business?
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: @.***>
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
This is unmaintained, switching to Uppy (they have a much more sane react implementation than uploadcare).
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
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 🙂