Skip to content

Commit

Permalink
Allow uploads of dll files (#8903)
Browse files Browse the repository at this point in the history
* Allow uploads of dll files

* Update File Upload Labels
  • Loading branch information
chidozieononiwu authored Sep 9, 2024
1 parent 5cabd4c commit c8c0ad3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h5 class="card-title">What to Upload</h5>
<p-fileUpload
#revisionCreationFileUpload name="selectedFile"
*ngIf="createRevisionForm.get('selectedCRLanguage')!.value != undefined && createRevisionForm.get('selectedCRLanguage')!.value!.label != 'TypeSpec'"
chooseLabel="Select {{ acceptedFilesForReviewUpload }} File to Upload" [customUpload]="true"
chooseLabel="Select File" [customUpload]="true"
[customUpload]="true" [showUploadButton]="false" [showCancelButton]="false" [previewWidth]="0"
accept="{{acceptedFilesForReviewUpload}}" class="mt-2" (onSelect)="onFileSelect($event)">
<ng-template pTemplate="content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ export class RevisionsListComponent implements OnInit, OnChanges {
case "C#":
this.createRevisionInstruction = [
`Run <code>dotnet pack</code>`,
`Upload the resulting .nupkg file.`
`Upload the resulting .nupkg or .dll file.`
];
this.acceptedFilesForReviewUpload = ".nupkg";
this.acceptedFilesForReviewUpload = ".nupkg, .dll";
this.createRevisionForm.get('selectedFile')?.enable();
this.createRevisionForm.get('filePath')?.disable();
break;
Expand Down Expand Up @@ -584,14 +584,15 @@ export class RevisionsListComponent implements OnInit, OnChanges {
break;
case "Json":
this.createRevisionInstruction = [
`Upload JSON API review token file.`
`Upload .json API review token file.`
];
this.acceptedFilesForReviewUpload = ".json, .tgz";
this.acceptedFilesForReviewUpload = ".json";
this.createRevisionForm.get('selectedFile')?.enable();
this.createRevisionForm.get('filePath')?.disable();
break;
default:
this.createRevisionInstruction = []
this.createRevisionInstruction = [];
this.acceptedFilesForReviewUpload = undefined;
}

if (this.revisionCreationFileUpload) {
Expand Down

0 comments on commit c8c0ad3

Please sign in to comment.