# Upload image to Cloudinary from within Glide

**URL:** <https://community.glideapps.com/t/upload-image-to-cloudinary-from-within-glide/11204>\
**Category:** Project Showcase\
**Created:** [June 21, 2020, 1:40pm UTC](https://community.glideapps.com/t/upload-image-to-cloudinary-from-within-glide/11204 "2020-06-21T13:40:30Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [July 14, 2020, 4:52pm UTC](https://community.glideapps.com/t/upload-image-to-cloudinary-from-within-glide/11204/15 "2020-07-14T16:52:54Z")

</div>

@Alexdz

It is a very simple webpage

```
<html>

<button id="upload_widget" class="cloudinary-button">Select file to upload</button>

<script src="https://widget.cloudinary.com/v2.0/global/all.js" type="text/javascript"></script>  

<script type="text/javascript">  

function GetURLParameter(sParam)
{
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
    for (var i = 0; i < sURLVariables.length; i++) 
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam) 
        {
            return sParameterName[1];
        }
    }
}

var imageid = GetURLParameter('imageid');

//var myFileName = "myName";
var myUploadWidget = cloudinary.createUploadWidget({

    prepareUploadParams: function(cb, params)
    {
        cb({public_id: imageid})
    },

    cloudName: "-------your-cloudname-----",
    uploadPreset: "----your-upload-preset",
// public_id: myFileName
  },
  (error, result) => {
     if (!error && result && result.event === "success") { 
      console.log('Done! Here is the image info: ', result.info); 
    }
  });

document.getElementById("upload_widget").addEventListener("click", 
    function(){
        myUploadWidget.open();
    }, false);
    
</script>

</html>
```

---

_[View the full topic](https://community.glideapps.com/t/upload-image-to-cloudinary-from-within-glide/11204)._
