se agregaron las imagenes

This commit is contained in:
2020-08-26 00:22:19 -05:00
parent 9d7a5d4980
commit 112a9b8976
146 changed files with 42 additions and 17 deletions
+2 -1
View File
@@ -11,5 +11,6 @@ app.use(express.json()) // for parsing application/json
app.use(express.urlencoded({ extended: true }))
app.use(require('./routes/index.js'))
app.listen(process.env.PORT, function() {
console.log('Example app listening on port ' + process.env.PORT + '!');
console.log(`Example app listening on port ${process.env.PORT}!`);
});
Binary file not shown.
+36 -14
View File
@@ -44,6 +44,7 @@ function corregir(cad){
async function readExecel ( path )
{
console.log(`Entreoasdas`);
console.log(`Entro a leer el excel`);
let workbook;
try{
@@ -51,22 +52,43 @@ async function readExecel ( path )
//console.log(`Este es el renglon: ${rows}`);
for(let i=1; i< rows.length ; i++)
{
let titulo = corregir(rows [i][0]);
let autor = corregir(rows [i][1]);
let categoria = rows [i][2];
let paginas = rows [i][3];
let isbn = rows [i][4];
let precio = rows [i][5];
let edicion = corregir(rows [i][6]);
let year = rows [i][7];
let descripcion = corregir(rows [i][8]);
let version = rows [i][9];
let sqlString = `INSERT INTO Libro values ( null, '${isbn}' , '${titulo}', '${categoria}', '${autor}', ${paginas}, '${edicion}', '${precio}', '${version}', '${descripcion}', ${year}); `;
try{
let titulo = corregir(rows [i][0]);
let autor = corregir(rows [i][1]);
let categoria = rows [i][2];
let paginas = rows [i][3];
let isbn = rows [i][4];
let precio = rows [i][5];
let edicion = corregir(rows [i][6]);
let year = rows [i][7];
let descripcion = corregir(rows [i][11]);
let version = rows [i][8];
let imagen = rows [i][10];
let pdfVis = rows [i][12];
let sqlString = `INSERT INTO Libro values ( null, '${isbn}' , '${titulo}', '${categoria}', '${autor}', ${paginas}, '${edicion}', '${precio}', '${version}', '${descripcion}', ${year}); `;
await query(sqlString);
console.log(`INSERTO CON EXITO ${autor}`);
sqlString = `SELECT LAST_INSERT_ID() as idLibro;`;
let sqlAnswer = await query(sqlString);
sqlAnswer = sqlAnswer[0];
let idLibro = sqlAnswer.idLibro;
sqlString = `INSERT INTO Imagen values (null, ${idLibro}, '${imagen}' );`;
await query(sqlString);
sqlString = `INSERT INTO Visualizacion values (null, ${idLibro}, '${pdfVis}' );`;
await query(sqlString);
}
catch(error){
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Some files were not shown because too many files have changed in this diff Show More