Is there a way of sending a file through an endpoint and let the consumer know the size of the file?

|
bryan_king 2021-09-21 10:53:21
Kashyap Parikh 2021-09-21 09:46:07

Your db has a table called poets. Am guessing it’s I typo error. I think u should change poets to posts in migration

Kashyap Parikh 2021-09-21 10:54:31
bryan_king 2021-09-21 10:53:21
Your db has a table called poets. Am guessing it’s I typo error. I think u should change poets to posts in migration

problem is i have migration and model file of post table as well

Kashyap Parikh 2021-09-21 10:54:45
still it is not migrating
KSRrrrrrr 2021-09-21 10:56:10
did u create and run it yet?
KSRrrrrrr 2021-09-21 10:56:39
try sign out and log in
bryan_king 2021-09-21 10:57:15
Kashyap Parikh 2021-09-21 10:54:45
still it is not migrating

Try migrating without model

EI 2021-09-21 12:33:06
Hello, please, I tried to integrate paystack to my laravel project, but the payment button is not working, kindly help
Cristo1985 2021-09-21 12:42:37
Hi can help me upgrading from 5.8 to 8?
Cristo1985 2021-09-21 12:42:49
I’m going crazy
Kashyap Parikh 2021-09-21 12:55:10
any one has link for performing crud
Jenya Punchenko 2021-09-21 13:11:44
Hello guys, i am extremely need explanation
Jenya Punchenko 2021-09-21 13:12:37
Laravel dispatch_now works fine. Simple dispatch after execution keeps trash in /tmp folder with phpQb8bY0 temporary files.
2021-09-21 13:13:05
hellow help solve this guys
Jenya Punchenko 2021-09-21 13:13:38
I am guess that file created somehow after interract Storage class. But problem exact with Redis queue
fasabbi 2021-09-21 13:13:56
Jenya check inbox
senhorY 2021-09-21 13:15:39
Hi. Is there a way of sending a file through an endpoint and let the consumer know the size of the file?
If I download a static file from the Internet I can get the bytes downloaded as well as the total bytes to be transfered, but when I do it from my endpoint the total bytes is -1.
This is my code:

public function download( Request $request ) {

abort_unless( $file = $request->input( ‘file’ ), 404 );
abort_unless( Storage::exists( $file ), 404 );

return Storage::get( $file );

}

2021-09-21 13:16:49
laravel_discuss-95094.jpg

2021-09-21 13:17:01
2021-09-21 13:16:49

Help in this

senhorY 2021-09-21 13:18:41
You have a non-unique value in a primary key
2021-09-21 13:18:58
how can i solve that
Jenya Punchenko 2021-09-21 13:20:12
2021-09-21 13:18:58
how can i solve that

DONT INSERT ID MANUALLY AT PLACE 1

2021-09-21 13:25:07
this the code
udindaffadienul 2021-09-21 13:25:16
laravel_discuss-95101.jpg
I have a question, why is my laravel validation error, is there something wrong?
Jenya Punchenko 2021-09-21 13:26:12
That’s was mistake.
Zoxedelfless 2021-09-21 13:27:58
Romil 2021-01-28 18:19:23
Hello everyone
Any suggestions for learning laravel micro service.!

you found any solution or some architecture ?

senhorY 2021-09-21 13:36:12
How can I serve a file from the storage, without having to process it with Storage::get() but keeping it private for certain users?
2021-09-21 13:43:17
Any one who can integrate mpesa on laravel app inbx
Amj 2021-09-21 13:47:44
Anyone offering remote internships or remote positions?
2021-09-21 13:59:54
who has a laravel project with mpesa integration to inbox me
Rashid 2021-09-21 14:04:07
any laravel developer here from kerala ?
pinchez2 2021-09-21 14:31:06
PHP Begginer 2021-09-21 00:20:17
Hallo

I am building a commnity website when user can post ,like ,comments etc so I have just designed the database design but I am not sure if I have done correctly .Am asking anyone from this forum to have a look and to give some feedback please

Okay fine

pinchez2 2021-09-21 14:31:35
jreadr 2021-09-21 03:50:31
I make form
But I have problems in controller
What is the code to update it

Update form or ? Can i see your controller ?

pinchez2 2021-09-21 14:31:51
code_with_shahzad 2021-09-21 07:46:05
Anyone here resume building expert?

Yes quality

Cedric Aubin 2021-09-21 14:32:40
2021-09-21 13:16:49

values for your primary key should be unique. Two ways to solve this :
1- you make the field auto incremental at the level of the database;
2- if for any reason you must insert the value manually, make sure it is unique

pinchez2 2021-09-21 14:33:11
Kashyap Parikh 2021-09-21 09:43:37
this error is coming trying to insert the data

Firt check your .env file if you are using correct db name and username ,
Secondly , check if tables you want to post on to are existing
After confirming run the migrations

|