Skip to content

Instantly share code, notes, and snippets.

View rijkerd's full-sized avatar
🇹🇿
Available

Ricardo Rushatsi rijkerd

🇹🇿
Available
View GitHub Profile
@rijkerd
rijkerd / getImageDimensions.js
Last active June 2, 2023 21:46
Get dimension of an image object uploaded to firebase storage
const functions = require('firebase-functions');
const mkdirp = require('mkdirp-promise');
const admin = require('firebase-admin');
const { execFile } = require('child-process-promise');
const path = require('path');
const os = require('os');
const fs = require('fs');
admin.initializeApp();
@rijkerd
rijkerd / uploadfirebase.js
Last active August 24, 2021 20:31
Implement of file upload with customrequest using antd and firebase storage
<Upload
name="file"
// eslint-disable-next-line no-undef
customRequest={data => {
const { firebase } = this.props;
const ref = firebase
.storage()
.ref('music')
.child(`${new Date().getTime()}`);