This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AbstractControl } from '@angular/forms'; | |
import { Observable, Observer } from 'rxjs'; | |
export const mimeType =( | |
control: AbstractControl | |
): Promise<{[key: string]:any}> | Observable<{[key: string]:any}> =>{ | |
const file =control.value as File; | |
const fileReader = new FileReader(); | |
const frObs = Observable.create((observer : Observer<{[key: string]:any}>)=>{ | |
fileReader.addEventListener("loadend", ()=>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install OpenSSL | |
apt-get install openssl | |
# Create a directory for your certificates | |
mkdir /etc/apache2/ssl/ | |
# Create the certificates | |