title: Rendering CSV data as HTML
body: <p>I am trying to get the jquery csv to table plugin working with the jquery file upload plugin (see <a href="http://code.google.com/p/jquerycsvtotable/" rel="nofollow">http://code.google.com/p/jquerycsvtotable/</a>).  It supports uploading a CSV file and upon successful upload (using JQuery File upload) immediately rendering it into HTML on the same page. This works fine when I set the $filePath as per example below. However, I wish to pass in this value as a hidden field and retrieve it by using the .attr method. However when I do this the CSV to table does not seem to render properly and the page seems to hang with the loadingImage (update still works), and the 'loadComplete' function is not executed (as per alert in example below).</p>
  
  <p>I can get it working as follows (see the lines in bold):</p>
  
  <pre><code>    }).bind('fileuploadcompleted', function (e, data) {        
          var $filename = $.trim($('#fileupload td.name').text());
          **var $filePath = 'bundles/jqueryfileupload/users/';
          //var $filepath = $('#upload_path_id').attr('value');**
          $.get($filePath + $filename, function(data) {
              $('#CSVSource').html('&lt;pre&gt;' + data + '&lt;/pre&gt;');
          });
          $('#CSVTable').CSVToTable($filePath + $filename,{
            loadingImage: 'bundles/jqueryfileupload/img/loading-table.gif',
            startLine: 0 }             
          ).bind("loadComplete",function() {
                alert('load complete!');
                $('button.btn.import').removeClass('disabled').addClass('ready');
                $('div.alert.alert-info').show();
          });
  </code></pre>
  
  <p>Any idea how I can get around this issue?</p>
  
  <p>UPDATE: It looks like the issue exists because I am retrieving an absolute path and this is failing with the ajax call that renders the csv to HTML. I'm using Laravel and have updated the paths.php file to include the following entry:</p>
  
  <pre><code>// --------------------------------------------------------------
  // The path to the storage/users directory.
  // --------------------------------------------------------------
  $paths['user_files'] = 'storage/users';
  </code></pre>
  
  <p>then in my view file I am passing in the file path as a hidden field as follows:</p>
  
  <pre><code>&lt;input type="hidden" id="upload_path_id" name="upload_path" value={{ path('user_files') }}&gt;
  </code></pre>
  
  <p>so my question is if I'm using both Laravel and Xampp locally on my machine is there a way to get this working with ajax either as a relative path or some other way?  The folder I'm using above is part of Laravel (i.e. under 'storage') and is ABOVE the public directory.</p>
  
  <p>Any help on this would be much appreciated.</p>