8 Replies Latest reply on Nov 29, 2014 1:51 PM by wimdecorte

    Can I store container data in webroot subFolder for html email reference?

    slayden@msn.com

      Thanks in advance for any help!

       

      Fm13 server.

      Sending HTML email using 360, but don't want to embed the pics...instead want to reference them.

       

      Plan is to have a table in my email fmPro database which stores attachments remotely in a subfolder of the webRoot on the same server.

      When I send email, I'd reference the img on the server, not embed it.

       

      I'd read a cautionary posting that remote storage files had to be in the filemaker folder. So, I'm checking.....

       

      Question:

      1. How to do, and
      2. is it OK to to point the external storage path on our MacMini server's web server?
      3. If not OK, what's a good plan b?

       

      Thanks

      Scott

        • 1. Re: Can I store container data in webroot subFolder for html email reference?
          Mike_Mitchell

          Scott -

           

          In theory, so long as the hard drive is physically connected to the same machine as the server, this should be possible. Here are a couple of threads that discuss issues and "gotchas" to mind:

           

          https://fmdev.filemaker.com/message/162892#162892

          https://fmdev.filemaker.com/message/93449#93449

           

          Mike

           

          Edit: Please note that I have not tried this myself; hence, the advice is worth what you paid for it.   

          • 2. Re: Can I store container data in webroot subFolder for html email reference?
            wimdecorte

            slayden@msn.com wrote:

             

            1. is it OK to to point the external storage path on our MacMini server's web server?
            2. If not OK, what's a good plan b?

             

             

            In general, no.

             

            You have to treat externally stored container data exactly like live FM files.  FMS has to be in absolute and exclusive control over it.  Any exposure to 3rd party processes is a huge risk and may corrupt your data and its backups.

            • 3. Re: Can I store container data in webroot subFolder for html email reference?
              lavendt

              Pay attention to what Wim says !

              Your wish is an absolutely no-go !

               

              You can do several other things, though....

               

              Suggestion 1:

              Use the power of xml or php to reference the images directly from your container field.

              This involves setting up an account, that can only view the images and an id for the records.

              By doing this, users will see the images directly from your container fields in your solution.

              The downside is that it will generate traffic to your FMS. If there will be a huge load, you should consider suggestion 2.

               

              Suggestion 2:

              Create a folder on a webserver, that can handle the load. It can be a good idea to use another server than the FMS, depending on the load and the power of your FMS server.

              When you upload images to a container field, create a version, either by creating a thumbnail or by using the original image and upload to this webfolder via e.g. ftp.

              This process could also be done in one action when you compile your email, so that only the images that are used for the email will be uploaded.

              • 4. Re: Can I store container data in webroot subFolder for html email reference?
                slayden@msn.com

                So, the images would be uploaded to the container data AND the webserver folder on the same machine? 

                 

                I'm really looking for a way to use fmPro to get images and other assets (pdfs, word docs, other attachment type items) to the webfolder so that when we send html email, the email can reference the item(s) and it will show in the email....

                 

                My concern is Wim's...that it would have a bad effect on backups and security.

                 

                The solution would not offer access to anything but the assets...as it would be in the web folder. 

                • 5. Re: Can I store container data in webroot subFolder for html email reference?
                  Mike_Mitchell

                  This is interesting, Wim. We saw a demo at DevCon this year, involving dropping an Excel file into a container field and subsequently importing records from that workbook into the database server-side. The "magic trick" was redirecting the container storage to a subdirectory in the Documents folder on the server (where FMS could get to it). Now, was this demo:

                   

                  1) Possible because it was FMS doing the accessing of the asset?

                  2) Okay because the asset was only accessed during the upload of the records, rendering backup and stability of the container asset mostly moot?

                  3) Okay because the developer could be in control of when the asset was accessed (similar to Claus's suggestion 2 below)?

                  4) Just really not a good idea?

                  • 6. Re: Can I store container data in webroot subFolder for html email reference?
                    slayden@msn.com

                    If the only thing that was being done by outside programs (non fm) was viewing img files, would that be a problem?

                     

                    How could using fm to manage img files in the webroot break or create problems if no one could rename it.

                    • 7. Re: Can I store container data in webroot subFolder for html email reference?
                      wimdecorte

                      slayden@msn.com wrote:

                       

                      If the only thing that was being done by outside programs (non fm) was viewing img files, would that be a problem?

                       

                      It's all about risk management.  On the surface, you could say it is ok but viewing will not lock the file or prevent FM from doing what it needs to do.  We think.  BUT you are putting the files in a place where it will not be clear that these should be left alone and managed by FMS.  For instance it can be very tempting to share that webroot folder for other purposes to make web site management possible.  Or to enable indexing, or external backups.  All of which will in the end come back and bite you.  It will be very difficult to maintain ths in a robust and safe fashion.

                      • 8. Re: Can I store container data in webroot subFolder for html email reference?
                        wimdecorte

                        Mike_Mitchell wrote:

                         

                        This is interesting, Wim. We saw a demo at DevCon this year, involving dropping an Excel file into a container field and subsequently importing records from that workbook into the database server-side. The "magic trick" was redirecting the container storage to a subdirectory in the Documents folder on the server (where FMS could get to it).

                         

                         

                        I'm aware of those demos.  In my book none of them are OK.  See my post from just now about risk management.  It is not uncommon for the docs folder of FMS to be shared for instance which can and will cause trouble for the container data at some point.

                         

                        It perverts the purpose of the remote container data principle and from where I sit, you simply do not mess with data.

                         

                        What the demos achieve can also be done in an infintely more safe way by using a little bit of OS scripting.