Open widget on page load

I’m using the React uploader and building a dedicated upload page for integrating with another application. Is it possible to have the upload widget open upon page load, so the user doesn’t have to click the “Choose a file” button? I was able to open the dialog programmatically using a 200ms timeout, but this feels unreliable.

I guess really what I’m looking to accomplish is like what you have on the Files page of the dashboard. However, I’m not seeing in the docs where you style this custom container

Hi @Eric_Luce ,

What you can see on the files page is our default widget with some CSS and JS customization. With the vanilla JS API of the widget, you can use the uploadDrop and openDialog methods to build a similar UI. Check out this example Custom widget element + receive drop - CodeSandbox

In react-widget, you may need to import the uploadcare object directly to get access to the above methods.

@ag1 can you please shed some light on the uploader implementation on the Files page?

I did notice that the react widget has an undocumented Panel component, but I get errors when trying to use it because it’s not properly exported in the typescript declaration file. That feels like the closest thing that will work in my use case, but it doesn’t support the forward ref or the onChange event (at least, from what I could find so far)