@@ -1064,9 +1064,12 @@ private Response doSubmit(String json, InputStream file, FormDataContentDisposit
10641064
10651065 // send this file upload along to archiver if configured
10661066 try {
1067- // if a FILE was sent, create a File Object from it
1068- File archiveFile = (null ==file ) ? null : new File (md .getFileName ());
1069- sendToArchiver (md .getCodeId (), md .getRepositoryLink (), archiveFile );
1067+ // if CO project type, no need to archive the repo or file because they are in GitLab
1068+ if (!DOECodeMetadata .Accessibility .CO .equals (md .getAccessibility ())) {
1069+ // if a FILE was sent, create a File Object from it
1070+ File archiveFile = (null ==file ) ? null : new File (md .getFileName ());
1071+ sendToArchiver (md .getCodeId (), md .getRepositoryLink (), archiveFile );
1072+ }
10701073 } catch ( IOException e ) {
10711074 log .error ("Archiver call failure: " + e .getMessage ());
10721075 return ErrorResponse
@@ -1216,14 +1219,18 @@ private Response doAnnounce(String json, InputStream file, FormDataContentDispos
12161219
12171220 // send this file upload along to archiver if configured
12181221 try {
1219- File archiveFile = (null ==file ) ? null : new File (md .getFileName ());
1220- sendToArchiver (md .getCodeId (), md .getRepositoryLink (), archiveFile );
1222+ // if CO project type, no need to archive the repo or file because they are in GitLab
1223+ if (!DOECodeMetadata .Accessibility .CO .equals (md .getAccessibility ())) {
1224+ File archiveFile = (null ==file ) ? null : new File (md .getFileName ());
1225+ sendToArchiver (md .getCodeId (), md .getRepositoryLink (), archiveFile );
1226+ }
12211227 } catch ( IOException e ) {
12221228 log .error ("Archiver call failure: " + e .getMessage ());
12231229 return ErrorResponse
12241230 .internalServerError ("Unable to archive project." )
12251231 .build ();
12261232 }
1233+
12271234 // send any updates to DataCite as well (if RELEASE DATE is set)
12281235 if (StringUtils .isNotEmpty (md .getDoi ()) && null !=md .getReleaseDate ()) {
12291236 try {
0 commit comments