are there logs available when using widget

Comments

6 comments

  • Avatar
    Aleksandar Kostadinov

    Hi Stephan,

    We can indeed check the logs but for that, we'll need your cloud name for us to filter on. What is the value of the error that you are seeing? In addition, are you able to share a URL to your site where this implementation is made so that we can take a look and test it there directly? If you'd like to share this information with us privately/outside of the forum then please send this to us by emailing support@cloudinary.com

    0
    Comment actions Permalink
  • Avatar
    Stephan

    Thank you Aleksandar for your reply. It is not currently live, still testing locally but my cloud name is dvme554nj.

    0
    Comment actions Permalink
  • Avatar
    Aleksandar Kostadinov

    Hi Stephan,

    Thanks for sharing your cloud name. I've gone ahead and checked our logs but no upload requests are coming through for your cloud. Would you be able to extract the small snippet of code (HTML + the JS for the widget) and share that in a JSFiddle/CodePen or similar where we can see the implementation and try to upload so we can test?

    When uploading locally, do you see any console errors in the developer tools and what is the error you mentioned that you were seeing but it wasn't descriptive? Would you be able to record the network traffic for the upload request, is there one sent?

    Lastly, is there a particular reason you're using this particular approach to open the widget? If you have an element that when clicked you'd like to open the widget then you can bind a listener to it so that it opens the widget without using jQuery. For example, https://jsfiddle.net/rsjh8fyn/

    1
    Comment actions Permalink
  • Avatar
    Stephan

    Sure thing you can see it here: https://codepen.io/stephangriesel/pen/ZEYXMLz but your approach looks way better, I am going to try it and see if that solves my problem. Is it possible to add parameter to add multiple images? Is there documentation available for your snippet? Thanks so much.

    0
    Comment actions Permalink
  • Avatar
    Aleksandar Kostadinov

    Thanks for that.

    I've had a look and saw that the source code for the widget it was loading wasn't the right one. Specifically, the correct URL to the widget source code is https://widget.cloudinary.com/v2.0/global/all.js but your script was using https://widget.cloudinary.com/v2.0/next/global/all.js (notice the 'next'). This was loading a different source code thus when sending the upload call it was attempting to POST it to api-dev.cloudinary.com. If you update the source URL it will upload to the correct endpoint (api.cloudinary.com).

    Regarding your question; Yes, you can certainly upload multiple files. We have extensive documentation with examples and all available parameters including for the upload widget which you can find here:

    https://cloudinary.com/documentation/upload_widget

    Please let me know if this clears things up.

    1
    Comment actions Permalink
  • Avatar
    Stephan

    That works perfectly, thanks so much. 

    0
    Comment actions Permalink

Please sign in to leave a comment.