Last active
October 29, 2021 18:10
-
-
Save SidneyAllen/840cbbb2796ee0cd8c3ffe1957753923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/components/Front.vue | |
function openUploadModal() { | |
window.cloudinary.openUploadWidget( | |
{ | |
cloud_name: import.meta.env.VITE_CLOUDINARY_NAME, | |
upload_preset: import.meta.env.VITE_CLOUDINARY_PRESET | |
}, | |
(error, result) => { | |
if (!error && result && result.event === "success") { | |
imgSrc.value = result.info.url | |
} | |
}).open(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment