mirror of https://github.com/apache/archiva.git
better file extension
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1542153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
86c913a95e
commit
34fd636ed8
|
@ -134,7 +134,7 @@ public class DefaultFileUploadService
|
||||||
//Content-Disposition: form-data; name="files[]"; filename="org.apache.karaf.features.command-2.2.2.jar"
|
//Content-Disposition: form-data; name="files[]"; filename="org.apache.karaf.features.command-2.2.2.jar"
|
||||||
String fileName = file.getContentDisposition().getParameter( "filename" );
|
String fileName = file.getContentDisposition().getParameter( "filename" );
|
||||||
|
|
||||||
File tmpFile = File.createTempFile( "upload-artifact", "tmp" );
|
File tmpFile = File.createTempFile( "upload-artifact", ".tmp" );
|
||||||
tmpFile.deleteOnExit();
|
tmpFile.deleteOnExit();
|
||||||
IOUtils.copy( file.getDataHandler().getInputStream(), new FileOutputStream( tmpFile ) );
|
IOUtils.copy( file.getDataHandler().getInputStream(), new FileOutputStream( tmpFile ) );
|
||||||
FileMetadata fileMetadata = new FileMetadata( fileName, tmpFile.length(), "theurl" );
|
FileMetadata fileMetadata = new FileMetadata( fileName, tmpFile.length(), "theurl" );
|
||||||
|
|
Loading…
Reference in New Issue