1 Reply Latest reply on Feb 21, 2008 11:28 PM by ajohnson1200

    Possible issue with attachment and document max size in CS 1.10.2

       

      I've located the problem and it appears to be a bug in Clearspace

      1.10.2 from what I can tell.  It looks like in order to bump up the

      file max for documents (docbody.maxBodySize)

      you must also bump up the file max property for the attachments (attachments.maxAttachmentSize).

      These are 2 separate properties in the application, but the validation

      code on the document upload seems to be keying on the attachment

      property only, so adjusting the docbody.maxBodySize doesn't work as it

      should.  It basically has no effect.  Once I set the attachment max property to match

      document max property, the document uploads are working fine.

       

      Also,

      it seems that the validation code on the upload form when adding a file based document needs to be

      clearer when the file max limit is enforced by the application.  Currently, you really

      don't know what happened except that that the document doesn't post to

      Clearspace.  You instead get form validation errors of  "you forgot to enter a name for the document" and " you must enter a document to upload".  This is confusing.  I think that the error should instead return something like "Your file size

      exceeds the currently allowed xxMB set by the administrator".

       

      Steps to reproduce:

       

       

      1. In the CS admin go to System > Settings > Attachments

      2. Set the "Max attachment size (KB)" to "15360" and save

      3. In the CS admin go to System > Settings > Documents

      4. Set the Max uploaded document size (KB) to "40960" and save

      5. Now return to CS and attempt to create a 25MB document using the "file" type document (MS Word or whatever).  Click create document, choose file based, enter a title, browse for the file, enter some tags, click Save Draft.

      6. The system now appears to do nothing.  No progress on the file upload.  After a few minutes, depending on network speed and doc size.  The process fails by returning you to the create document screen and throwing form validation errors of "you need to enter a title" and "you need to enter a file to upload".  No other error tells you what happened

       

      To fix (workaround):

       

      1. Go back into the CS admin and set the attachment size to match the document max size of "40960"

      2. Reattempt the document create and it works perfectly.

       

       

      My Environment:

       

      OS: Ubuntu Linux 6.06 Server LTS

      JVM:

      1.6.0-b105

      Database: MySQL 5.0.22 (driver - mysql-connector-java-5.1.5)

      App Server: Tomcat 6.0.14

      SSL: yes