Skip to content

Instantly share code, notes, and snippets.

View shriomtri's full-sized avatar

Shriom shriomtri

View GitHub Profile
@shriomtri
shriomtri / userAvatar.js
Created June 29, 2021 08:18 — forked from SylarRuby/userAvatar.js
NodeJs AWS S3 Upload
/**
* This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from
* a base64 string.
* Updated to use Promise (bluebird)
* Web: https://mayneweb.com
*
* @param {string} base64 Data
* @return {string} Image url
*/
const imageUpload = async (base64) => {