0

Looking at the docs I'm trying to send some value along with the image. Not sure if I have the params: in the correct location. Having trouble and not sure if it client or server side.

<script>
        $(document).ready(function(){
            var thumbnailuploader = new qq.FineUploader({
                element: $('#thumbnail-fine-uploader')[0],
                request: {
                    endpoint: 'image-uploader.cfc?method=Upload'
                },
                params: {
                   foo: {
                      one: 'bar',
                      two: 'bar2'
                   }
                },
                multiple: true,
                validation: {
                    allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
                    sizeLimit: 102400 // 100 kB = 100 * 1024 bytes
                },
                text: {
                uploadButton: "\+ Click or Drop"
                 },
                callbacks: {
                    onComplete: function(id, fileName, responseJSON)
                            {
                                 if (responseJSON.success) {
                                     $('#thumbnail-fine-uploader').append('<img src="/Test/file2/files/' + responseJSON.filename +'" alt="' + fileName + '" style="width:150px;height:150px;">');
                                     $('#thumbnail-fine-uploader').append('<b style="color:red;">' + responseJSON.foone +'</b>');
                                                           }
                            }
                            }
            })
        });
    </script>

1 Answers1

1

I had similar difficulty in gathering info from the docs. The example code in the Params BLOG post didn't have enough context. Turns out, you need to place the Params block inside the Request block. This should get you going.

This page mentions the Params going within the Request section: http://docs.fineuploader.com/integrating/options/fineuploaderbasic.html

Hope this helps!

Mark Feltner
  • 2,041
  • 1
  • 12
  • 23
  • Thanks for pointing out the confusion in the blog post. I assume you were talking about the ["Include params in the request body OR the query string "](http://blog.fineuploader.com/2012/11/include-params-in-request-body-or-query.html) blog entry. I've just updated the entry to add more context to the example code. – Ray Nicholus Apr 17 '13 at 14:16