8 Replies Latest reply on Sep 3, 2009 10:29 AM by mrvodka

    Export database with photos to web

    daknecht

      Title

      Export database with photos to web

      Post

      I have a database that contains pictures and I want to be able to post some of the text data along with the photos on my web site.  The export feature seemed unable to export the photo part of the records.  Is there any way around this problem?

        • 1. Re: Export database with photos to web
          mrvodka
             You can export the field contents, but it has to be for each record.
          • 2. Re: Export database with photos to web
            comment_1
              

            You need to export the pictures one by one, using the Export Field Contents[] script step in a loop. In the text export, you can include only a reference (make sure it matches the name you're giving the image when exporting it).

             

            This is assuming the images are embedded in the container field. If you already have them in a folder somewhere, you could just upload the folder to your site.

            • 3. Re: Export database with photos to web
              daknecht
                 I have the pictures in iPhoto and embedded (at least that is what I presume the Insert/Picture command did). If I export them separately using the script, how would I then get them associated with the correct record in the web listing?  Also, when I try to do the text export, it won't let me add the photo so how would I get the reference into the exported htm file?
              • 4. Re: Export database with photos to web
                comment_1
                  

                daknecht wrote:
                I have the pictures in iPhoto and embedded (at least that is what I presume the Insert/Picture command did).

                Not quite: when you insert a picture, you have the choice to "Store only a reference to the file". If you select it, the picture is not embedded (though it still can be exported using Export Field Contents…).

                 

                 


                daknecht wrote:
                how would I then get them associated with the correct record in the web listing?

                You should have some kind of naming scheme. If the picture names are unique, you could use that (you can extract the picture's name using GetAsText (Container) - the details depend on whether it's embedded or not). Or you could use a text field to both name the picture when exporting it and for referring to it in the HTML.

                 

                 

                Note that exporting as HTML will NOT create links to the images. The best way to do this is export as XML, using a custom XSLT stylesheet to place the exported data into a HTML template.

                 

                 



                • 5. Re: Export database with photos to web
                  daknecht
                     They are embedded and have unique names.  I still don't know where the export of the picture name would be done.  Is that somewhere in the Export command or somewhere else?
                  • 6. Re: Export database with photos to web
                    comment_1
                       I'd suggest you try the following:


                    1. Define a calculation field cImageName (result is Text) =

                    GetAsText ( YourContainerField )


                    2. Create a new folder named "ExportFolder" on your desktop.


                    3. Run the following script:

                    Show All Records
                    Go to Record/Request/Page [ First ]
                    Loop
                    Set Variable [ $filePath; Value:"filemac:" & Get ( DesktopPath ) & "ExportFolder/" & cImageName ]
                    Export Field Contents [ YourTable::YourContainerField; “$filePath” ]
                    Go to Record/Request/Page [ Next; Exit after last ]
                    End Loop

                     









                    • 7. Re: Export database with photos to web
                      MikeyG79
                         I didn't think containers could be exported....
                      • 8. Re: Export database with photos to web
                        mrvodka
                           They cant as a batch export. But as stated previously in this thread, you CAN export a container field's contents.