Category : angular

I recive the data by json angular request, but I don´t have ($_FILES[‘name’][‘tmp_name’]) format, so i can´t use move_uploaded_file() WEB Json data avatar { contentType "application/pdf" data "data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlcy1DTykgL1N0cnVjdFRyZWVSb290IDMxIDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4vTWV0YWRhdGEgMjMyIDAgUi9WaWV3ZXJQcmVmZXJlbmNlcyAyMzMgMCBSPj4NCmVuZG9iag0KMiAwIG9iag0KPDwvVHlwZS9QYWdlcy9Db3VudCA0L0tpZHNbIDMgMCBSIDE3IDAgUiAyMiAwIFIgMjYgMCBSXSA+Pg0KZW5kb2JqDQozIDAgb2JqDQo8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL1Jlc291cmNlczw8L1hPYmplY3Q8PC9JbWFnZTUgNSAwIFIvSW1hZ2U3IDcgMCBSPj4vRXh0R1N0YXRlPDwvR1M2IDYgMCBSL0dTMTAgMTAgMCB…Dg5NiAwMDAwMCBuDQowMDAwMzU4MDc2IDAwMDAwIG4NCjAwMDAzNTgxMjIgMDAwMDAgbg0KdHJhaWxlcg0KPDwvU2l6ZSAyMzUvUm9vdCAxIDAgUi9JbmZvIDMwIDAgUi9JRFs8MDlEM0VCOEI1NzE4NTg0MEIxMjA3MkEyMUM2RkNEOTg+PDA5RDNFQjhCNTcxODU4NDBCMTIwNzJBMjFDNkZDRDk4Pl0gPj4NCnN0YXJ0eHJlZg0KMzU4ODcyDQolJUVPRg0KeHJlZg0KMCAwDQp0cmFpbGVyDQo8PC9TaXplIDIzNS9Sb290IDEgMCBSL0luZm8gMzAgMCBSL0lEWzwwOUQzRUI4QjU3MTg1ODQwQjEyMDcyQTIxQzZGQ0Q5OD48MDlEM0VCOEI1NzE4NTg0MEIxMjA3MkEyMUM2RkNEOTg+XSAvUHJldiAzNTg4NzIvWFJlZlN0bSAzNTgxMjI+Pg0Kc3RhcnR4cmVmDQozNjM3MzINCiUlRU9G" filename "manualversion1.pdf" size 363915 } descripPretensiones "gsdfgfgdfdgf" fecFin "2021-06-17T05:00:00.000Z" PHP In this part i dont have any response of try catch, no error o problem, but my ..

Read more

I have recived all the infromation by my form, but I can´t get the name or size of the input file, so i can´t use $_FILES by php HTML – input file <li class="list-group-item"> <label for="Fichier1" class="form-label">Soporte 1</label> <input class="form-control" type="file" id="Fichier1" name="Fichier1" (change)="cambioFile1($event)"> </li> Angular – Add file input to form (formaA : FormGroup) ..

Read more

I need to turn my laravel api + angular sanctum authentication into a SAML authentication. I’ve noticed that I need to use a laravel plugin like laravel-saml2 or laravel-saml2. (Yes… Same name but different plugins) I intend to use OKTA because I am already using it to authenticate in my Stack ELK. But my biggest ..

Read more

I’m sending an Angular http request with headers let auth = ‘user:pass’; const httpOptions = new HttpHeaders({ ‘Content-Type’: ‘application/x-www-form-urlencoded’, ‘Access-Control-Request-Headers’: ‘Content-Type, Authorization’, ‘Authorization’: ‘Basic ‘ + btoa(auth) }); this.http.get<any>(backendUrl, { headers: httpOptions }) on my php backend (that is protected with htaccess password) i have in the first lines of the .htaccess file: Header set ..

Read more

this is the function trigger on select file, the file upload response is coming on inside r.on(‘filesuccess’, function(file, message){ }) but here i need to call api but api is not calling from here selectUpload(){ r.upload(); r.on(‘fileSuccess’, function(file, message){ let requestObject = { filename: r.files[0].file.name, originalname: r.files[0].file.name, mimetype: r.files[0].file.type, size : r.files[0].file.size, } this._docService.files(requestObject).subscribe(); }); ..

Read more

Im struggling on a project. I need to upload and display files. My upload is working perfectly, however when i try to list the files nothing happens. I dont even get an error, Im using a php script to fetch files from the dir and my php output is: ["ftp-20210602130836.txt","Screenshot 2021-06-02 at 08.53.38-20210602131900.png"] code for ..

Read more

I keep getting the following error when calling a backend API from my Angular frontend. Both the frontend and the backend are running on the same server under the same domain www.ff-almoshof.de The frontend can be called from www.ff-almoshof.de/checkin and the API is located at www.ff-almoshof.de/api For the API the PHP Slimframework V4 is used ..

Read more

I have an issue when I use HTTP Request in Angular. Is a POST type request but I have this response, can someone help me? error: ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: "error", …} headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, headers: Map(0)} message: "Http failure response for *private url*: 0 Unknown ..

Read more