Note that there are some explanatory texts on larger screens.

plurals
  1. POValums file-uploader on nodejs - multiple file upload
    primarykey
    data
    text
    <p>I'm using <a href="http://valums.com/ajax-upload/" rel="nofollow">valums ajax file-uploader</a></p> <p>My nodejs server side looks like this:</p> <pre><code>fileStream = fs.createWriteStream(__dirname+'/../public/images/houses/'+rndname); req.pipe(fileStream); req.on('end', function() { body = '{"success":"true", "name": "'+rndname+'"}'; res.writeHead(200, { 'Content-Type':'text/plain' , 'Content-Length':body.length }); res.end(body); }); </code></pre> <p>client side:</p> <pre><code> function createUploader(){ var uploader = new qq.FileUploader({ element: document.getElementById('homepic'), action: '/server/upload', allowedExtensions: ['jpg', 'png', 'gif'], multiple:true, onComplete: function(id, fileName, responseJSON){ $("#homepic").append("&lt;img src='/images/houses/"+responseJSON.name+"' class='mediumpic' /&gt; "); } }); } window.onload = createUploader; </code></pre> <p>This all works for single file upload just great!</p> <p>So imagine - i press on upload button, chose pic, it uploads really fast, shows up in screen. Now i want to upload another one. I choose pic, it uploads on server fast (i see it on server), i get back the response of new filename and success, i put the picture on screen with my append. But the picture does not show up. I try open in new tab just the pic and still nothing even though i see it on the server standing in the right dir. After like 3-5 min of waiting it just shows up, without even page refresh needed. Whats causing this behavior? Is it the piping and i need to call Mario to fix it or something else? :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload