Upload widget v2.0: open menu on load on mobile
Hi
Is it possible to open the menu by default on the mobile version of the upload widget? (Instead of opening the default source...) My users would like to see all the options, because now it isn't clear they have to click the "hamburger button" to see the other upload options.
Is there a way to change this behaviour?
Greets
Stijn
-
Hi Stijn,
When you open Cloudinary Upload Widget v2.0, by default it will give the list if resources, unless it's override to open a certain URL.
If you can open a ticket with the cloud name and the code of your upload widget (or the URL where it has the upload widget), we can assist you deeper on this.
Regards,
Erwin Lukas1 -
Hi
Thanks for the comment. I've tried to solve my problem by removing the "defaultSource" option.
But that didn't work. Now my upload widget just remembers the 'view'. When I close the widget while I'm on the menu, it shows the menu the next time I open the widget.
But the first time I open the widget, it still opens on "google image search", while there's no defaultSource anymore.
cloudname is hunk4smqo
AngularJS Code that opens the widget:
var widgetOptions= {sources: ['image_search', 'local', 'url'],resourceType:'image',multiple:false,theme:"minimal",showPoweredBy:false, //Note: Supported only for paid Cloudinary accounts and requires some time for cache expiration.showAdvancedOptions:false,showCompletedButton:false};/** Get a signature for a signed upload to Cloudinary */clsrv.getSignature=function (callback, params_to_sign) {//call to my server to create signature...callback(signature);});}
/*** Create a cloudinary upload widget* @function createWidget* @param {String} publicId A dynamically chosen publicId* @param {function} callback A callback function with arguments error and results to handle events in the upload widget* @return {CloudinaryUploadWidget}* */clsrv.createWidget=function(publicId, callback) {if (publicId) {widgetOptions.publicId=publicId;}widgetOptions.uploadSignature=clsrv.getSignature;return cloudinary.createUploadWidget(widgetOptions, callback);}Greets
Stijn
1 -
If I change the order of sources: ['image_search', 'local', 'url'] to sources: ['local', 'image_search', 'url']. It seems to work as I want.
Is it possible the order of sources has impact on the menu-behaviour on mobile?
0 -
Hi Stijn,
It's not possible to re-order the sources of Upload Widget. By specifying sources
['image_search', 'local', 'url']
or
['local', 'image_search', 'url']
It should gives you the same order of sources: local, url, and image search.
Regarding defaultSource, I am unable reproduce the issue on my test page and behaves as expected (if no defaultSource, it will gives the list of sources). Can you make sure you are not accessing browser cache?
Is there a test URL that I can take a look?Regards,
Erwin Lukas0
Post is closed for comments.
Comments
4 comments