Skip to content

Embed Link

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> upload = client.uploadAsync(“/path/to/file”, false); upload.doOnNext(new Consumer>() { @Override public void accept(Progress progress) throws Exception { System.out.printf(“%f%% uploaded “, progress.getPercent()); if (progress.getData() != null) { FileLink file = progress.getData(); } } }); // 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> upload = client.uploadAsync(“/path/to/file”, false); upload.doOnNext(new Consumer>() { @Override public void accept(Progress progress) throws Exception { System.out.printf(“%f%% uploaded “, progress.getPercent()); if (progress.getData() != null) { FileLink file = progress.getData(); } } });

Loading