use CGI; $query = new CGI; my $filePath = $query->param( 'filepath' ) || ""; my $tmpFilename = $query->tmpFileName( $filePath ) || ""; # check if file exists and has non zero size if( ! -s "$tmpFilename" ) { my $url = getOopsUrl( "oopsupload", $filePath ); print $query->redirect( $url ); return; } # cut path from filepath name (Windows "\" and Unix "/" format) my @pathz = ( split( /\\/, $filePath ) ); my $filetemp = $pathz[$#pathz]; my @pathza = ( split( '/', $filetemp ) ); my $fileName = $pathza[$#pathza]; $fileName =~ s/[^A-Za-z0-9_\.\-]//go; # delete special characters # save uploaded file my $newFile = "/path/to/public/folder/$fileName"; `cp $tmpFilename $newFile`; umask( 0027 ); chmod( 0644, $newFile );
Corporate Collaboration (Web Techniques, Dec 2000)
We take collaboration on the Internet for granted. Email is the most ubiquitous method we use to share ideas with others. There are also mailing lists, Usenet groups, bulletin boards, and proprietary systems like Lotus Notes. Each one has its purpose, and each one has strengths and weaknesses.Related Reading
More Insights
INFO-LINK
To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy. | |