import React from 'react';
import { PickerOverlay } from 'filestack-react';
const FileUploader = () => {
return (
<div>
<h2>Filestack Uploader in React</h2>
<PickerOverlay
apikey={'AFqRzdbMvTw6n5CKmZaC0z'}
onUploadDone={(result) => {
console.log('Upload successful:', result);
}}
pickerOptions ={{
"accept": [
".pdf",
"video/*",
"image/jpeg",
"image/*",
"audio/*",
"text/*"
]
}}
/>
</div>
);
};
export default FileUploader;
// Create a client
Config config = new Config(“AFqRzdbMvTw6n5CKmZaC0z”);
Client client = new Client(config);
// Set options and metadata for upload
StorageOptions options = new StorageOptions.Builder()
.mimeType(“text/plain”)
.filename(“hello.txt”)
.build();
// Perform a synchronous, blocking upload
FileLink file = client.upload(“/path/to/file”, false);
// Perform an asynchronous, non-blocking upload
Flowable