Announcement

Collapse
No announcement yet.

Documents library sample app upload...

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

  • Documents library sample app upload...

    I was hoping having a sample app would help me figure out why my upload of doc's has never worked, but I still am having no luck.

    I imported the app and created the MySQL database. I can connect and see all the data with no problems and can add comments to existing documents.

    However... if I use form_tb_documents to try and create / upload a new file it does nothing. The online sample is great, but I need to be able to replicate this.

    In the Application Settings tab I changed the Documents Path to "/Applications/NetMake/v7/wwwroot/scriptcase/file/doc", which is the absolute path to the directory on my laptop. (I'm on a mac). I have the Image Directory set to "/scriptcase/file/img'.

    I have tried every possible directory setting that I can think of with no success.

    Since this is a fully developed app it would seem like just changing the storage settings are all that it would take.

    Can you point me to what I'm missing?

    Thank!

    Todd

  • #2
    Most likely this is a security issue, you don't have write permission on the directory where the docs are stored. Since it's linux based I guess that the user running the webserver might differ.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Hi,

      It's not a security issue.

      To test I copied a script where I write an export file out and changed the path to match the file library. The test file is written fine with no issue. I'm including the script below.

      The directory has full rights for user www and group wwwrun, so it's not security.

      Every server we deploy on is linux based, so figuring this out is really important to myself and from my reading, quite a few others.



      --- Script

      $ExportPath = "/Applications/NetMake/v7/wwwroot/scriptcase/file/doc/" ;
      $FileName = "test" ;
      $Ext = ".csv" ;
      $SA_CDS_test = $ExportPath . $FileName . $Ext ;
      $LineEnd = "\r";
      $CDSHeader = "Lookup ID,Lockbox Batch #,Batch Sequence,Gift Amount,Gift Date,Check Number,"
      . "Pay Method,Partial Credit Card Number,Expiration Date,Credit Card Type,Finder Number,"
      . "Designation,Letter,Appeal,Source Code,Fund" . $LineEnd ;


      $CDSfh = fopen($SA_CDS_test, 'w') or die ("Can't open file");

      fwrite($CDSfh, $CDSHeader);

      fclose($CDSfh);

      Comment


      • #4
        I thought this issue was on your mac. I will try the sample, but we have other upload modules running without problems. On linux hosting as well as windows hosting. I.e. upload csv to be imported in our systems. Sometimes the webserver is running under another user and that user has limited rights. If that's not the case with you I don't know why you can't upload.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X