File file = new File( SystemUtils.getJavaIoTmpDir(), fileName );
log.debug( "delete file:{},exists:{}", file.getPath(), file.exists() );
boolean removed = getSessionFileMetadatas().remove( new FileMetadata( fileName ) );
+ // try with full name as ui only know the file name
+ if ( !removed )
+ {
+ removed = getSessionFileMetadatas().remove( new FileMetadata( file.getPath() ) );
+ }
if ( file.exists() )
{
return file.delete();
"knockout.simpleGrid","jquery.validate","bootstrap","jquery.fileupload","jquery.fileupload.ui"]
, function(jquery,i18n,utils,jqueryTmpl,ko) {
- ArtifactUpload=function(classifier,pomFile){
+ ArtifactUpload=function(classifier,pomFile,packaging){
this.classifier=classifier;
this.pomFile=pomFile;
+ this.packaging=packaging;
}
ArtifactUploadViewModel=function(managedRepositories){
submit: function (e, data) {
var $this = $(this);
$this.fileupload('send', data);
- artifactUploadViewModel.artifactUploads.push(new ArtifactUpload(data.formData.classifier,data.formData.pomFile));
+ artifactUploadViewModel.artifactUploads.push(new ArtifactUpload(data.formData.classifier,data.formData.pomFile,data.formData.packaging));
return false;
}
}
);
fileUpload.bind('fileuploadsubmit', function (e, data) {
var pomFile = data.context.find('#pomFile' ).is(":checked");
- var classifier = data.context.find('#classifier' ).val();
+ var classifier = data.context.find('#classifier').val();
+ var packaging = data.context.find('#packaging' ).val();
+ $.log("packaging:"+packaging);
if (!data.formData){
data.formData={};
}
data.formData.pomFile = pomFile;
data.formData.classifier = classifier;
+ data.formData.packaging = packaging;
});
}
});