5 Replies Latest reply on Jul 15, 2010 8:33 AM by Günter Schenk

    Multiple Image Upload

    Vitalized

      I'm using the Multiple Image Upload behavior to have a user upload images to a dynamic folder name; however, the image file can not be renamed.  How do I get this image into a database and/or renamed so I can retrieve it without having to manually rename the file or add it to the database?

        • 1. Re: Multiple Image Upload
          Günter Schenk Level 4

          It looks as if a file renaming option is only available when using the Multiple Image Upload with Save to Database wizard, which - in addition to uploading the images into the desired folder -  will store the file names in a database table of your choice.

           

          Cheers,

          Günter

          • 2. Re: Multiple Image Upload
            Vitalized Level 1

            I've now tried using the multiple image upload as well as the multiple image upload saved to a database.  The multiple image upload is clean and easy to use.  I prefer this technique; however, I have a hard time getting the images back since they aren't in the database.  They are in a unique folder, but I don't know how to get them from that point.

             

            The multiple image upload with a save to a database works, but it needs to be an update verse insert transaction.  Everytime you upload the image, it creates a new record.  I would prefer to have everything in one location for the ad.

             

            Any suggestions?  I'm stuck!!!!

            • 3. Re: Multiple Image Upload
              Günter Schenk Level 4

              Vitalized wrote:

               

              They are in a unique folder, but I don't know how to get them from that point.

              Are you using the "dynamic folder name" approach here as well ? If so, what´s your usage scenario, and how could the corresponding folder name subsequently be used in a query which retrieves the images from that folder ? Hint: I´ve always set the "dynamic folder name" to be the integer ID value of, say, an article which the array of corresponding image names are related to. This approach makes it pretty easy to retrieve them at a later time.

               

              I would prefer to have everything in one location for the ad.

              In your case the dynamic folder name could well equal the corresponding ad ID -- a value which you could pass to the multiple image upload page as e.g. URL parameter.

               

              The multiple image upload with a save to a database works, but it needs to be an update verse insert transaction.

               

              Guess my ADDT tutorial "Using a Dummy table: how to outsmart ADDT" will be of some help ;-)

               

               

              Cheers,

              Günter

              • 4. Re: Multiple Image Upload
                Vitalized Level 1

                I am using the id as the dynamic folder name.  All the files are in this folder to be displayed in the ad.  With randomly named files, I just can't retrieve them.  If I could use the multiple image upload (no save to database) and be able to display the image by going to the correct directory, my problem would be resolved.  I just don't know how to display an image with a random file name.

                 

                Thanks a TON for the help!!!

                • 5. Re: Multiple Image Upload
                  Günter Schenk Level 4

                  Vitalized wrote:

                   

                  I am using the id as the dynamic folder name.  All the files are in this folder to be displayed in the ad.  With randomly named files, I just can't retrieve them.

                  Regretfully there´s no renaming possibility when using the "no save to database" variant, but when you say that the file names are random anyway, I wonder if you really need to rename them at all.

                   

                  I just don't know how to display an image with a random file name.

                  Option 1: retrieving all images located in a dynamic folder by using ADDT´s File List Recordset, what´s a pretty straight-forward solution

                   

                  Option 2: by tweaking and implementing a 3rd party PHP script such as "Extracting Images from a Directory" -- you´ll find lots of them when googling "php imagelist directory" or similar terms.

                   

                  Cheers,

                  Günter