• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

limiting the upload file sizes and overall storage amounts

Hello,

We are currently using www.activecollab.com (install on a win server) for managing our projects however we have come across a flaw. There is no way to limit the amount of data uploaded into the document area or file size of the opject being uploaded.

We are considering the option of building our own activecollab module to:
 
- limit the amount of data stored.
- limit the file size of the object uploaded.
- limit the types of files that can be uploaded by extension type.


This feature is quite common in other applications, we are just wondering if someone could please explain the logic behind it so that we can draft technical requirements.

Thanks :)
0
PlumInternet
Asked:
PlumInternet
  • 2
2 Solutions
 
Gurvinder Pal SinghCommented:
0
 
vineethvpCommented:
Say the below is the file uploader:-

<input type="file" name="company_logo" />

Using PHP we can find the filesize using

      $_FILES["company_logo"]["size"];

We can find the type of the file using

      $_FILES["company_logo"]["type"];

For images the file type will be as follows-

"image/extension of the image"  - For example :- "image/jpeg" -> For a jpeg image.

You can use these to

- limit the amount of data stored.
- limit the file size of the object uploaded.
- limit the types of files that can be uploaded by extension type.
0
 
vineethvpCommented:
I had a look at ur site www.activecollab.com which is developed in PHP .. Thats y i suggested the above methods in PHP..
0
 
PlumInternetAuthor Commented:
Not very specific to windows and activecollab
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now