Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

646
Visualizações
how to set api request to google drive api using axios

I working on a google drive project but I am not able to send search parameters with Axios to google API from frontend react

can any explain to me how to write queries like in google drive api url

  1. Search all files and folders by date
  2. Find a file by size
  3. Find all empty folders
  4. Find a file by type such as ppt, image, etc

Axios request look like that

 axios.get('https://www.googleapis.com/drive/v3/files?access_token='+accessToken+'&q=mimeType%3D%22application%2Fvnd.google-apps.folder%22').then(res=>{
    console.log(res)
    setFolders(res.data.files)
}).then(err=>{
    console.log(err)
})

Thanks in advance :)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Axios is not your problem the API does not support what you are trying to do for the most part.

Search all files and folders by date

You cant really. Download them all and search locally

Find a file by size

You cant. Download them all and search locally

Find all empty folders

Its not easy and will be a lot of requests but. You could use q to only get folders and then make separate requests using parents and then see if there are any files returned.

Find a file by type such as ppt, image, etc

Us the q parameter and search by mime type you will just need to google the correct mime type for the file you are looking for.

mimeType='application/vnd.ms-powerpoint'

You should have a look at the Search terms refrence documentation it will show you wnat you can search on.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda