1

Re: Uploading Images (Instant Indicia)

I've enabled the "tabbed date entry form" Feature which includes links to upload images. However when I try to do so I hit problems:

in Firefox I get a message dialog headed undefined (N/A) and the message "Resizing" - but this never goes away (the image I'm testing is only 640x426 px and 89 kb in size). In Chrome I just get "An error occurred uploading the file. failed to save the uploaded file"

It's not clear to me where it's attempting to upload the file. I've tried giving blanket permissions on /default/files but the image still will not upload.

Alan

Alan Hale
Aberystwyth

2

Re: Uploading Images (Instant Indicia)

Hi Alan
I've managed to replicate the problem in Firefox, though it only seems to occur with some resized images. I have a suspicion it may relate to the browser version being updated and the upload component not working properly in the new version, so I have updated to the latest available version of the PlUpload component we are using. It seems to work now fine in both FireFox and Chrome, so please can you update the iform module with the latest code from Subversion and check if it works. If you want me to sort out a zip file of the changes let me know.
Regards

John van Breda
Biodiverse IT

3 (edited by Alan Hale 19-10-2011 13:44:25)

Re: Uploading Images (Instant Indicia)

Hi John

I've solved this, and I think there may have been two separate issues involved.

First of all, I did a complete new Instant Indicia install (from the original code on the download page) , on a sub-domain where I'd selected PHP to run as CGI rather than Apache module (on my original install I'd had PHP running as Apache module and i suspected this might have been causing some permission problems).

Uploading of images on the fresh install (PHP as CGI) worked -  in Chrome but NOT in Firefox.

So, I installed the newer Iform module from Subversion - and, Eureka! - it works in Firefox too now.

Cheers

Alan

Alan Hale
Aberystwyth

4

Re: Uploading Images (Instant Indicia)

I seem to have lost the ability to upload images again, this time on a fresh install of 0.7.1. It's somewhat different this time though because when I click on the "Select File(s)"  button  I get no response at all - no sign of the uploading dialog box.

I've checked and double-checked and everything seems to be in place as per the tutorial (CMS user ID etc. attributes added to the survey).

John - if I send you account details for this new site, would you mind taking a look? (No rush - i apreciate it's the weekend).

Cheers

Alan

Alan Hale
Aberystwyth

5 (edited by Alan Hale 22-10-2011 14:45:40)

Re: Uploading Images (Instant Indicia)

OK, after some more testing I've found that this problem seems to manifest when I apply a new custom attribute  (in this case "Host Plant") to occurrences and having this show up as a select list in the tabbed data entry form by adding the token [species attributes]. The weird thing is the problem persists, if I:

a) remove [species attributes] from the form settings
b) disable the custom attribute for the survey
c) or even delete the custom attribute completely

This despite clearing the cache after each change.

I've replicated the effect on another fresh Instant Indicia install - image upload works fine till I enable a new custom occurrence attribute.

Alan

Alan Hale
Aberystwyth

6

Re: Uploading Images (Instant Indicia)

Hi Alan
The problem is caused by the extra blank lines you have added to the Form Structure setting - if you remove those (either side of the resizeWidth and height settings) it should work.
I've fixed the code to make it tolerate this in future.
Best wishes

John van Breda
Biodiverse IT

7

Re: Uploading Images (Instant Indicia)

Thanks John - removing the blank lines does fix the problem. But if I add the [species attributes] token again and get my "host plant" select list, the image upload stops working again.

Cheers

Alan

Alan Hale
Aberystwyth

8

Re: Uploading Images (Instant Indicia)

Hi Alan
You don't need to add [species attributes] because the grid will automatically include columns. [species attributes] is really for single species entry when you want a list of controls to appear somewhere on the form outside the grid. When the grid is used, [species attributes] is ignored, except that in your case you inserted it above the @resizeWidth and @resizeHeight settings thereby breaking the uploader's settings.
Cheers

John van Breda
Biodiverse IT

9

Re: Uploading Images (Instant Indicia)

Ah, I see. Thanks John, that's all working fine now. I'm not sure where I picked up that I should add [species attributes].

Cheers

Alan

Alan Hale
Aberystwyth