PDA

View Full Version : Multiple image upload setup


jshafor
08-31-2009, 11:18 AM
I'm having two issues with DFP2.

1. The insert page: when I set the "Default" file to an image in my images directory, it doesn't load. Isn't this the file I want DFP2 to load in the event I don't choose an image using the file field "Browse" button?

2. The update page: when I upload a new "product" and I choose an image (insert page) - it loads like normal and the the image and image_thumb are created (uploaded) and displayed appropriately. Then, if I go to the update page and don't reload the image with the file field "Browse" button, it returns to the details page with the following change: the normal image (which is suppose to be there) is replaced by the image_thumb. If I repeat the process and upload the image again using the update page - it then replaces the image_thumb with the full sized image; when I run the update page again, it cycles back to the image_thumb instead of the normal sized image.

The documentation is pretty clear for the update page in how to modify the WA Upload behavior for the first image being uploaded (it explains how to create and use the hidden field - setting it as the "default", etc) - but it doesn't address the additional files: do I have to create an additional "hidden form element" for each of the additional images I'm loading (in this case the image_thumb) so the update form has the correct reference for the "Default" file?

In the "If file exists:" section of the wizard, I have: Renaming existing file AND [ExistingFileName]_[Increment]. Does that affect anything?

I appreciate your help in solving these issues. Thanks.

Jason Byrnes
08-31-2009, 02:24 PM
1) The default file setting is not a default file that will be uploaded, it is the value that will be given to the server file name variable if no image is uploaded. It is more for the update page that for the insert page, though you could have a default filr hat is used in the case of the image not being uploaded already on the server, use that file name in the default image section to use. It is intended to be for use with files that are already uploded to the server.



2) In the case where you are uploading a large image and a thuimbnail image, you will want to be storing the image name in the two column of the database. In this case, you will have two hidden form elements to bind the default image for each one.