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

112
Visualizações
How can you add an image to the realtime database?

I'm having trouble trying to add a image to my realtime database and thus have it display on the site. In the code shown below it appears in the firebase storage but it does not appear in the database. How can I make it do both?

var newData = {
            UUID: refUUID,
            Status: 'Active',
            Recommended: false,
            Price: priceValue.replaceAll(',', ''),
            Location: {
                Address: addressValue,
                City: cityValue,
                State: stateValue,
                Zip_Code: zipCodeValue,
                Country: 'US'
            },
            Description: {
                Date_Listed: date + ' ' + time,
                Bathrooms: bathroomsValue,
                Bedrooms: bedroomsValue,
                Description: descriptionValue
            }
        }

        ref.set(newData);

        for (let i = 0; i < filess.length; i++) {
            storage.ref(refUUID + '/' + filess[i].name).put(filess[i]).then(() => {
                storage.ref(refUUID + '/' + filess[i].name).getDownloadURL().then(function (url) {
                    database.ref(listingType + '/' + refUUID + '/Description/Images/Image' + (i + 1)).set({
                        Link: url,
                        name: 'Image' + (i + 1)
                    })
                });
            });
        }
        clearFields();
        addAuditLog('Added Listing', refUUID, '');
        document.getElementById('add-successful-modal').style.display = 'block';
about 4 years ago · Juan Pablo Isaza
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