File Upload Using AngularJS with PHP Script

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thanks brother. I want to upload image with description. Can you please explain and reply brother

GopiDaggumalleChowdary
Автор

Any ideas why in php $_FILES data is empty, nothing is passed there. Thanks

solticsca
Автор

image is getting added to the folder but its not getting viewed on the page ...how????

pressypereira
Автор

image is getting added to the folder but its not getting viewed on the page ...how????

pressypereira
Автор

hi sir, what should i do if there is also input text? input text and image path are saved in database
thank you

yogiari
Автор

This is awesome. +1 👍
Can you do with dynamic add multiple image before saving?
Thank you 👍👍👍

samuelsodagudi
Автор

This code never work in real time, instead of directive why you don't use ng-upload library?? It's just a crap....

soumyajeetseal
Автор

Hey my friend, GREAT TUTORIAL, but i have some many questions about, like this one :
-I watched that you programmed the upload file to the datebase, what did I say this? because I always read that is better upload files to the server.
-Using the database for this files is so easy how can I know the file of the user, but with the server I DON'T KNOW HOWWWW
-THANK YOU FOR YOUR TIME!

estebanaguirre
Автор

Hola. Para los que tuvieron problemas, yo lo resolví así:
Minuto 05:00 reemplacé el var files por
Primero porque el files no me lo guardaba en el scope y no lo podía acceder y segundo porque si trabajamos con varios input file, esto los junta en un array y no los pisa.

Minuto 09:50 al append le convertí en array el 'file' para contemplar mas de un input file dentro del formulario y a su vez tuve que leer el índice [0] del parámetro file de entrada para poder capturar correctamente el archivo adjunto en el código PHP $_FILES.

angular.forEach(scope.files, function(file){
form_data.append('file[]', file[0]);
});

Saludos

sergiogman
Автор

very nice tutorial please upload video laravel and angular js
thank you

romeshshil
Автор

the pictures are saving in database but its not displaying in the web.. please help!

petewhite
Автор

Any ideas why in php $_FILES data is empty, nothing is passed there. Thanks

f_ftactics