Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
Google File Picker: Fix return to root folder comes up empty

In my JS file picker implementation, I am successfully able to download files successfully, and navigate through the folder structure. However, if I return to the root folder after navigating away from it, nothing is displayed:

View implementation:

    const createView = () => {
        const google = google || window.google;
        // show all docs
        const view = new google.picker.DocsView();
        // include the ability to see & navigate folders
        view.setIncludeFolders( true );
        // constrain file types to those accepted for upload
        let mimeTypes = '';
        const acceptedTypes = [
            ...Globals.acceptedSharedDocumentFileTypes,
            ...Globals.googleFileMimeTypes,
        ];
        for ( const type of acceptedTypes ) {
            if ( acceptedTypes.indexOf( type ) < acceptedTypes.length - 1 ) {
                mimeTypes += `${ type },`;
            } else {
                mimeTypes += type;
            }
        }
        view.setMimeTypes( mimeTypes );
        // view as list instead of GRID
        view.setMode( google.picker.DocsViewMode.LIST );
        return view;
    };

Picker Implementation:

    const initFilePicker = () => {
        // open the file picker
        const google = google || window.google;
        const view = createView();
        const picker = new google.picker.PickerBuilder()
            .addView( view )
            .setOAuthToken( authObject.access_token )
            .setDeveloperKey( googleKeys.web.api_key )
            .setCallback( handlePickedFiles )
            .build();
        picker.setVisible( true );
    };

What am I missing?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!