Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda