T
T
theEternalStudent2016-06-17 14:19:31
Angular
theEternalStudent, 2016-06-17 14:19:31

How to upload file to server in laravel using angular?

Good afternoon. I'm trying to upload a file to the server using this script here: jsfiddle.net/2vq88rfs/767 (only the url is not https://angular-file-upload-cors-srv.appspot.com/upload , but the corresponding route that sends it to the controller.) The file should store the following code in the controller: https://jsfiddle.net/33w370ye/2/ . In the controller, a check is made for the existence of the file, a directory is created, but the file itself is not saved into it. So I figured someone might be able to help me figure it out.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2016-06-17
@alexey-m-ukolov

Return Values
​​Returns TRUE on success.
If filename is not an uploaded file, no action is taken and move_uploaded_file() returns FALSE.
If filename is an uploaded file but cannot be moved for any reason, no action is taken and move_uploaded_file() returns FALSE. In addition, a warning is displayed.
php.net/manual/en/function.move-uploaded-file.php#...

N
Nikolai Shvetsov, 2016-06-24
@ShNn

I don’t see the laravel code, show me, then it will be easier to understand what the problem is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question