Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FileItem and file size

    Hi,

    I just would like to know if (and how) it is possible to put a maximum file size restriction to a file item to prevent the user from uploading verrrrrrrryyyy large files to our application.

    Many thanks for your help,

    Thomas

    #2
    See DataSourceField.maxFileSize

    Comment


      #3
      Excellent.
      Is it possible to add some custom logic to this or is it a flat, global, value? For example we would like to specify, let's say, 1MB for images and 20MB for documents... Any way to achieve this?

      Comment


        #4
        Not a builtin way - but you could probably add it fairly easily to a custom DataSource by using dsRequest.getUploadedFile() to get at the ISCFileItem being uploaded and checking its size and filename

        Comment

        Working...
        X