Project

General

Profile

« Previous | Next » 

Revision 7818

View differences:

src/perl/register-dataset.cgi
689 689

  
690 690
	debug("Trying to insert the following document");
691 691
	my $docStatus = "SUCCESS";
692
	debug("Starting insert (D1)");
692
	debug("Starting insert of $docid (D1)");
693 693

  
694 694
	my $response = $metacat->insert( $docid, $xmldoc );
695 695
	if ( !$response ) {
......
1240 1240

  
1241 1241
	# write file to disk, get SHA1 hash and size
1242 1242
	my ( $outFile, $fileHash ) = writeFile($fileName);
1243
	debug( "processed file to temp directory:  $outFile" );
1243 1244

  
1244 1245
	my $fileSize = stat($outFile)->size;
1245 1246
	if ( $fileSize == 0 ) {
......
1258 1259
	}
1259 1260

  
1260 1261
	my %dataInfo = (
1261
		'fileName'    => $fileName,
1262
		'fileName'    => $outFile,
1262 1263
		'fileHash'    => $fileHash,
1263 1264
		'contentType' => $contentType,
1264 1265
	);
......
1290 1291
	# use tempfile for writing
1291 1292
	my $tmp = File::Temp->new( 
1292 1293
						TEMPLATE => 'tempXXXXX',
1293
                        DIR => '$tempDir',
1294
                        SUFFIX => $cleanName);
1294
                        DIR => $tempDir,
1295
                        SUFFIX => $cleanName, 
1296
                        UNLINK => 0);
1295 1297
	my $outputName = $tmp->filename();
1296 1298
	#open( OUT, ">$outputName" ) or die "Could not open: $!";
1297 1299
	print $tmp $fileData;

Also available in: Unified diff