try {
Long l = putHelper.getContentLength( request );
String ct = putHelper.findContentTypes( request, newName );
log.debug( "PutHandler: creating resource of type: " + ct );
Resource newlyCreated = folder.createNew( newName, request.getInputStream(), l, ct );
manager.getEventManager().fireEvent( new PutEvent( newlyCreated ) );
} catch( IOException ex ) {
log.warn( "IOException reading input stream. Probably interrupted upload: " + ex.getMessage() );
return;
}
manager.getResponseHandler().respondCreated( folder, response, request );