Media Gallery Field uploadpath not set

Topics: Core, General
Jul 16, 2013 at 12:53 PM
When using the new media gallery field i can not seem to get any images to upload. Looking at the URL I see that the uploadpath is not set in the query string.

/Admin/MediaPicker?uploadpath=&callback=_pickimage_1373968841284&editmode=false&1373968841284

Looking at the code it would appear the difference from the MediaPickerField is the setting of
uploadMediaPath: 'images' add this to the code below fixes the issue and allows images uploads. Although shouldn't this append the content ID to create a unique folder? I'm sure this is what happened in the past.

Snipet from MediaGallery.Edit.cshtml
        // adding a new item
        addButton.click(function() {
            addButton.trigger("orchard-admin-pickimage-open", {
                callback: function(data) {
                    
                    var template = @(safeDescriminator)_Template
                        .replace( /\{url\}/g , formatUrl(data.img.src))
                        .replace( /\{alt\}/g , data.img.alt)
                        .replace( /\{class\}/g , data.img['class'])
                        .replace( /\{style\}/g , data.img.style)
                        .replace( /\{align\}/g , data.img.align)
                        .replace( /\{width\}/g , data.img.width || '0')
                        .replace( /\{height\}/g , data.img.height || '0');
                    
                    var content = $(template);
                    $('#media-gallery-@descriminator tbody').append(content);

                    refreshIds();
                    $('#save-message-@descriminator').show();
                },
                baseUrl: '@baseUrl'
                uploadMediaPath: 'images'   // Added to allow images upload to work
            });
        });
Using the latest source from 1.x

Seems like a bug to me? although i want to check first...
Jul 17, 2013 at 11:36 AM
Ok... so its been a while since I played around with Media... I see Media Gallery field has now been Deprecated! I have switched to the new Media Library Field and its great.