views:

37

answers:

1
+1  A: 

You can compress it (create a tar file for example) when moving the file from its temp upload location to a more permanent place on disk. However the file types you are talking about are binary files which don't always compress very much. Second no one compression scheme will result in the best results for all file types.

Steve Robillard
In this site, user can also see that file which they had uploaded. Now if i try to make any tar or zip file, then when user want to see that data, then i have to convert also in the original format which will take many times.
Nitz
I would be very concerned about security. If the user can both upload any file and see it (I assume you mean click a link). there is little stopping them from uploading arbitrary code which will be run by your server. Safety says that you should at least change the name and prevent any script from executing.
Steve Robillard