• Error importing pictures

    By Sander Zwart 2 decades ago

    When preesing import now i receive the message type mismatch.

    • some ideas

      By Christian Brandlehner 2 decades ago

      Hi Sander,



      please add more information about your configuration and some steps to reproduce the problem.

      Just having the error message you are desribing, you should check if you have configured all three configuration documents in the database. I am actually not checking for missing configuration settings in the database.



      Christian

      http://chris.brandlehner.at

    • version 0.9m

      By Lionel Dupre 2 decades ago

      when pressing "import" and selecting a Jpeg file, I get a "File not found" error.

      Server is Domino R6, using Client Notes R6 …

      • Same problem

        By Mac Sokulski 2 decades ago

        I get the same response. I use domino 6.5.1 and Notes 6.5.1 The client is installed on win XP sp1, with full rights to the system. I examined the Import script, and went through it with Lotus Script debugger. All the variables are assigned properly, but for some reason the jpg is not being copied to %systemroot%\temp directory, which causes the File Not Found error. I modified the path to point to a different directory and it sort of works (I can import 1 picture at a time), but I get Path/File Access error. This prevents of importing more than 1 picture at a time. Any ideas?



        Mac

        • Trying to delete the same file twice

          By Paul Frolov 2 decades ago

          I found the second problem in Import sub. The following lines Kill in_image and Kill out_image attemt to delete the same file twice as out_image and in_image are set to the same file name. Comment out one of them

          • RE: attempt to delete the same file

            By Christian Brandlehner 2 decades ago

            The file is just the same if the imported picture is a JPG too. If we import a TIF file in_image and out_image are different.

            As a fix we can either

            a) check if file exist before attempting to delete it

            b) check if both filenames are the same to just delete one

            c) resume next and delete both regardless if they exist.



            What do you prefer? Any code examples for me to implement?



            Christian

        • RE: %systemroot%\temp

          By Christian Brandlehner 2 decades ago

          I seems I reimplemented a bug I had fixed previously. See: http://www.openntf.org/projects/pmt.nsf/0/32ed54fac855726486256e20007ec674?OpenDocument



          I am going to fix this soon.



          Christian

          • fix attempt

            By Christian Brandlehner 2 decades ago

            Maybe this fixes the problem:




            Call ReadProfile<br/>
            Call ReadWebProfile<br/>
            Set db = session.currentdatabase<br/>
            Const TEMPNotesMacro = |@If(@Contains(@RegQueryValue(&quot;HKEY_LOCAL_MACHINE&quot;; &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; &quot;TEMP&quot;);&quot;%SystemRoot%&quot;);@ReplaceSubstring(@RegQueryValue(&quot;HKEY_LOCAL_MACHINE&quot;; &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; &quot;TEMP&quot;);&quot;%SystemRoot%&quot;;@RegQueryValue(&quot;HKEY_LOCAL_MACHINE&quot;; &quot;SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion&quot;; &quot;SystemRoot&quot;));@RegQueryValue(&quot;HKEY_LOCAL_MACHINE&quot;; &quot;SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment&quot;; &quot;TEMP&quot;))|<br/>
            xTemp = Evaluate(TEMPNotesMacro)<br/>
            ONPD_Temp = xTemp(0)<br/>
            





            There is sure some space for improvement so please send me your code for review.



            Christian

            • By Mac Sokulski 2 decades ago

              What I have done to fix this is actually edited the registry setting. Instead of %systemroot% I used c:\windows. Now I know this is not a clean fix, since on windows nt and 2000 %systemroot% is c:\winnt. Also found the Kill in_image and kill out_image and rem'ed out one of them. This seemed to fix both of my problems. Yes yes, it's not a fix for everyone.

              Now I'm wondering if instead of using the system temp directory, use the path of EzThumbs? It is safe to assume that everyone who uses this database will install this program, and this way no registry needs to be modified, and all the "temporary files" get deleted from there anyway. Just a thought.



              Mac

              • had another thought

                By Mac Sokulski 2 decades ago

                In the Settings document have a field where a user can specify they're own temp directory?



                Mac

                • Win32 API

                  By Sam Star 2 decades ago

                  Hello,

                  the windows API offers functions to get the location of the temporary folder, it also suggests a temporary file name.. i have the code for that (but not under my hands at the moment)..

                  I would suggest using the API because Win 95, 98 & ME do not support the temp path in the registry location you're referencing.. I tell you that a good amount of home users are still using Win ME.. the API call also fixes the %systemroot% issue.



                  I'll provide the code soon…



                  thanks