Thanks - setting chunk size to 1MB has fixed it. Much appreciated!
A minor note, the docs for chunk_size don't describe what formats this setting can be, e.g. would it accept 500K, 500Kb or 0.5MB etc?
Plupload Forum » Posts by johnvb
Pages 1
Thanks - setting chunk size to 1MB has fixed it. Much appreciated!
A minor note, the docs for chunk_size don't describe what formats this setting can be, e.g. would it accept 500K, 500Kb or 0.5MB etc?
Excellent, thanks!
Ah, I just suggested my client tries Silverlight so maybe that wasn't the right move! There is an example image here:
http://dc315.4shared.com/download/lQwDK
nload=true
Thanks
Bump!
Using plupload 1.3 and flash runtime, with resize set to 1200px*1200px at quality 90, there are one or two jpg images which upload but are resized by flash with only the top 3/4 of the image showing - the rest is left white. I guess it is something to do with the last chunk not going through. One of the images is 1365px*1265px, 225Kb but I am having no problems with resizes of much larger images. If I change the resize parameters to 800px*800px or 1600px*1600px it works fine.
Anyone else experienced this? I can supply example images if required.
Just a note that I came across this problem as well and the fix works. Spocke - any chance of your thoughts on whether we are doing something else wrong or is this a necessary fix?
One for Spocke - in the HTML4 runtime, when the code resets the target and action of the form as follows:
// Reset action and target
if (form.tmpAction) {
form.setAttribute("action", form.tmpAction);
}
if (form.tmpTarget) {
form.setAttribute("target", form.tmpTarget);
}I don't think it is necessary to test if tmpAction or tmpTarget has a value. You would never want to not reset these. E.g. if your form has no target, then it gets changed by the uploader and never reset. If your form has no action (admittedly this is not correct HTML4), then it is also not reset, but then the form will never post to its intended destination.
If you use plupload on a web browser with Silverlight 2 installed, it prompts you to upgrade to Silverlight 3. But the user can refuse, in which case the upload control will not work.
Ideally I think the Silverlight runtime should be ignored unless Silverlight 3 is installed. Is that possible?
Got it. We had written our own jQuery plugin instead of using QueueWidget, so that it would fit in well with the way the rest of our code library worked. But in our case, we did not specify the container setting in the call to plupload, as it is optional. If you take a look at the HTML4 runtime you will see that if container is not specified, document.body is used for the container, which does not work. You need to specify the container as an element which is within the form.
I'd suggest 2 small changes, first to correct the documentation for container:
Element ID to add object elements to, this defaults to the document body element.
And second to force some sort of error rather than using document.body if the container is not supplied.
Thanks again for your help.
John
I must be missing something here, I can't see how it will work if the inputContainer is appended to the container. Assuming you don't override the default behaviour through the settings, line 60 sets container = document.body. The body contains the form, obviously, so if you add the inputContainer to the container (=document.body) it is effectively an orphaned input element. When you submit the form, the image file is not included in the post data. The inputContainer must be added to the form, or an element inside the form, or you can't upload the image in the form submission.
Any thoughts? Thanks for responding to my questions though Spocke, it may sound like I am moaning, but I appreciate being able to bounce these things off the developer whether they turn out to be bugs or issues in my code.
Thanks Spocke for the very timely reply. It works a treat, but I am still a bit confused why I need to change the code in the HTML4 runtime to add the inputContainer to the form rather than the container. Is this a bug?
Another point I have picked up is that on IE7 I could not get the file open dialog to appear with the HTML 4 runtime. With a bit of css hacking I got a red border to appear round the shim, and realised it was off to the left of where it should be. The reason is my template sets the body css to margin: auto with a fixed width, positioning the body in the middle of the browser. In IE8 and Firefox, the call to plupload.getPos correctly takes this into account, returning the x as 485 pixels. But in IE7 it seems to be unaware that the body is centred, and returns 45 pixels. I found that this difference is reflected by document.body.offsetLeft so I have changed the html4 runtime's shim positioning code in my copy to:
plupload.extend(document.getElementById(uploader.id + '_iframe_container').style, {
top : browsePos.y + 'px',
left : (browsePos.x+document.body.offsetLeft) + 'px',
width : browseSize.w + 'px',
height : browseSize.h + 'px'
});Does this make sense?
Still no luck on this. I've just downloaded the latest version, 1.2.2.1, which claims to have some fixes in this area, but it makes no difference. In fact now even the example page http://www.plupload.com/example_all_runtimes.php does not work for HTML4 on IE8. When you select a file it is fine, but then when you press upload IE opens a download box as it is trying to open the JSON response from the upload.php script rather than use it as a JSON response properly.
On my own code, I get the same problem, but only after implementing another bugfix I found. In the HTML4 runtime, on line 213, it says:
// Append to form
container.appendChild(inputContainer);But this means the inputContainer is appended to the container, not the form that is going to be submitted. So it gets stuck in the wrong place in the DOM and is not included in the POST. So, I found that if I replace container with form it works, or at least now it sends the correct POST data:
// Append to form
form.appendChild(inputContainer);Any help would be much appreciated, as we are going live on a project on Monday.
Got it. In plupload.html4.js, line 207 reads
container.appendChild(inputContainer);This means the hidden input that is supposed to contain the file is inside the container, not inside the form that gets submitted. So the submitted form is empty. It should read:
form.appendChild(inputContainer);This sounds like http://www.plupload.com/punbb/viewtopic.php?id=43. But the demos of HTML4 upload do work, so we must be doing something wrong.
Thanks. I'm not sure what you mean by "integration with an application", but actually I think it is the second one. If I put some debug code in my upload.php file, I can see the content type is multipart, but the $_FILES array is empty when using Internet Explorer 8 & html4.
Has anybody actually got this setup working?
Hi,
I'm new to plupload so I may be doing something wrong, but I can't get the html4 runtime to work. Under Internet Explorer, I select a file to upload and start the uploader. However, then I see a dialog "Do you want to open or save this file" with upload.php as the selected file. So it appears to be trying to download the results of the post to upload.php rather than treat it as an AJAX response.
Also, under FireFox HTML4 appears to work but I don't get an uploaded file.
Any thoughts what I am doing wrong, or is this a bug?
Pages 1
Plupload Forum » Posts by johnvb
You are not logged in. Please login or register.