
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@codice-progressio/easy-images
Advanced tools
Subida de imagenes facil a google cloud storage con firebase
Subida de imagenes fáciles a google cloud storage desde express
npm i @codice-progressio/easy-images
Agregas tu configuración en app.js/index.js
const easyImages = require("@codice-progressio/easy-images")
easyImages.parametros.config({
GCLOUD_PROJECT_ID: process.env.GCLOUD_PROJECT_ID,
GCLOUD_STORAGE_BUCKET_URL: process.env.GCLOUD_STORAGE_BUCKET_URL,
GCLOUD_APPLICATION_CREDENTIALS: process.env.GCLOUD_APPLICATION_CREDENTIALS,
})
process.env.GCLOUD_APPLICATION_CREDENTIALSdebe ser un string con formato valido para parsear a JSON.
const easyImages = require("@codice-progressio/easy-images")
app.put(
"/ruta-subir-imagen",
// Definimos la cantidad de imagenes que esperamos recibir,
// por defecto la libreria solo ha sido testeada en single
easyImages.recibirImagen.single("img"),
// Este middleware redimenciona en memoria la imagen .
// Actualmente no se pueden modificar en medidas diferentes a
// 1200px
easyImages.redimencionarMiddleware,
async (req, res, next) => {
easyImages
.subirImagen(req.file)
.then(data => {
publicUrl = data.publicUrl
// data retorna nuevoNombre que se genera con mongoose.
// ObjectId y data.publicUrl que es la ruta completa
// para ver la imagen en el bucket (debe estar publico)
res.send(data)
})
.catch(_ => {
next(_)
})
}
)
await easyImages.eliminarImagenDeBucket(imgDB.nombreBD)
FAQs
Subida de imagenes facil a google cloud storage con firebase
We found that @codice-progressio/easy-images demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.