Announcement

Collapse
No announcement yet.

Unable to open *.* files after download - using file database

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to open *.* files after download - using file database

    Hello everyone,

    I'm using scriptcase v.8.

    I have a database named - filedb where I have as columns: fileid (int) , filename (varchar) , file (blob) .

    The proablem appear when I whant to open the downloaded file (the uploaded file). It says that it can't open it.

    What can I do?
    Thank you,
    Dan
    Last edited by dan.dinu; 02-13-2015, 12:07 PM.
    Thanks for your time & have a nice day,
    Dan

    //覧覧覧覧覧覧覧
    Scriptcase Version 8.00.0030
    Types pe_mysql_bronze

  • #2
    Check out where the files are placed for download. I guess it is in the tmp directory. If so then check out the rights of that directory. It may be that you need to deploy your application in advanced mode with some customised paths...

    Comment


    • #3
      Originally posted by rr View Post
      Check out where the files are placed for download. I guess it is in the tmp directory. If so then check out the rights of that directory. It may be that you need to deploy your application in advanced mode with some customised paths...
      Hello,

      I did..same result.
      Thanks for your time & have a nice day,
      Dan

      //覧覧覧覧覧覧覧
      Scriptcase Version 8.00.0030
      Types pe_mysql_bronze

      Comment


      • #4
        Ok I need more details then, since you dont have many. The advanced deployment paths would be a good start.
        And are you tesing in scriptcase or with a deployed version?
        Next to that you should try the following:
        Use an ftp to connect to your server and find the tmp directory or go directly (remote desktop or whatever) to the web server tmp directory. No next to that open your application and upload a file (a big one would be easier), and immediately see if the file with a similar name and the same size is uploaded to the tmp dir. If so then you know that at least the file gets received. If not then there is something else wrong.

        Comment


        • #5
          Originally posted by rr View Post
          Ok I need more details then, since you dont have many. The advanced deployment paths would be a good start.
          And are you tesing in scriptcase or with a deployed version?
          Next to that you should try the following:
          Use an ftp to connect to your server and find the tmp directory or go directly (remote desktop or whatever) to the web server tmp directory. No next to that open your application and upload a file (a big one would be easier), and immediately see if the file with a similar name and the same size is uploaded to the tmp dir. If so then you know that at least the file gets received. If not then there is something else wrong.
          hello,

          and sorry for my late unser,

          the deploying works perfectly, if a chose file or picture file name it works great (i can download them or see them)...but if i chose file or picture db ...i get no error on uploading and no error on downloading...the proablem is just i can't open the file...it seams tha it forgets the tipe of the file and it become imposible to be readed..

          thank you for your time,
          Dan
          Thanks for your time & have a nice day,
          Dan

          //覧覧覧覧覧覧覧
          Scriptcase Version 8.00.0030
          Types pe_mysql_bronze

          Comment


          • #6
            Hmm too bad I havent really tried picture db. On the other hand I would never want to use it, it would make the database grow too quickly.
            I would really need to inverstigate this in more detail. As far as I can see in my generated source code I see that a file gets created in using this piece of code:

            2157| $sc_obj_img = new nm_trata_img($this->Ini->root . $out_filename);
            ...
            3680| if (substr($this->filename, 0, 4) == "*nm*")
            3681| {
            3682| $this->filename = substr($this->filename, 4) ;
            3683| $this->filename = base64_decode($this->filename) ;
            3684| }
            3685| $img_pos_bm = strpos($this->filename, "BM") ;
            3686| if (!$img_pos_bm === FALSE && $img_pos_bm == 78)
            3687| {
            3688| $this->filename = substr($this->filename, $img_pos_bm) ;
            3689| }
            3690| fwrite($arq_filename, $this->filename) ;
            3691| fclose($arq_filename) ;
            3692| $sc_obj_img = new nm_trata_img($this->Ini->root . $out_filename);
            Hence I see a file being written to a specific directory. So you would need to look if a temporary file even gets created.
            Sorry I cant help you further, I only use file storage since that is the better way for us.

            Comment

            Working...
            X