0

In my code, I want the user to be able to write a PDF path to a text box, for example like "\\Server\\Stability\202606\\file1.pdf" and I also want him to be able to click open button and open the PDF file using this path. Here is my code, I can't figure out the way to do it. What should I do?

<ng-container matColumnDef="FilePath">
                                <th mat-header-cell *matHeaderCellDef> File Path</th>
                                <td mat-cell *matCellDef="let row; let i = index">
                                    <span *ngIf="EditIndex != i">{{row.LabAnalysisFiles.FilePath}}</span>
                                    <mat-form-field floatLabel="never" *ngIf="EditIndex == i" class="w-100-p">
                                        <input matInput name="FilePath" [(ngModel)]="row.LabAnalysisFiles.FilePath" type="text">
                                    </mat-form-field>
                                </td>
                                            <button mat-icon-button matTooltip="Open" [disabled]="!isValid">
                                            <mat-icon>open_in_browser</mat-icon>
                                        </button>
Grim Stone
  • 95
  • 2
  • 9
  • By local path, you mean the user's computer file system or server's file system? – Sameer Jul 09 '21 at 12:28
  • The user's file system. – Grim Stone Jul 09 '21 at 12:28
  • That's not possible, The file system cannot be accessed and with front-end language definitely not, you have to use `` to allow the user to choose from the file picker, Read this [answer](https://stackoverflow.com/a/372333/11719787) you will get an Idea. – Sameer Jul 09 '21 at 12:36

0 Answers0