Uploaded filesattachments

Since we enabled the File uploads module, we can allow our users to upload and attach files or images to content, which can be both good and bad. Thankfully, the settings available for this allow us to restrict the file types allowed, as well as the sizes of the files uploaded.

From Administer | Site configuration | File uploads, we can control:

• The width and the height of images uploaded (images may be scaled down automatically)

• If files should be listed as attachments with their content (if not, then they would need to be linked into their content).

• File types which are allowed (by default, only images and documents are allowed, which is more than reasonable, and I'd recommend this remain as it is; other extensions may allow users to upload virus-infected files which other users would then download)

• The maximum size of a file that can be uploaded

• The total amount of space a user can utilize with uploads

File uploads

3 General settings

Maximum resolution for uploaded images:

0 KIDTHxHEIGtil

The maximum allowed Image size (e.g. 640x480). Set to 0 for no restriction. If an image toolkit Is Installed, files exceeding this value will be scaled down to fit.

List files by default:

Yes t

Display attached files when viewing a post.

Default permitted file extensions:

jpg jpeg gif png txt doc xls pdf ppt pps odt cds odp

Default extensions that users can upload. Separate extensions with a space and do not include the leading dot.

Default maximum file size per upload:

1 MB

The default maximum file size a user can upload. If an image is uploaded and a maximum resolution Is set, the size will be checked after the file has been resteed.

Default total file size per user: 1 MB

The default maximum size of all Files a user can have on the site.

Your PHP settings limit the maximum file size per upload to 2 MB.

The maximum file sizes depend entirely on the amount of space and resources the site has available. If you are going to run your social network from a shared host, you may want to keep these sizes as they are. If you are planning to use a dedicated server, you may wish to increase some of the limits, depending on how many users are active on the site. These facts would need to be carefully considered at the time.

The maximum size for uploaded files is often also limited by the servers PHP settings. So if we were to increase the limit to 5Mb, we would still be limited to only 2Mb because of our PHP settings. This can be altered via the PHP configuration file. For more information, contact your web host about limits they impose, and about editing the PHP.ini file.

0 0

Post a comment