anon34905's avatar

Upload file in specific directory

Hello,

is there any way to upload files in a specific directory and store the path in the database?

e.g

/storage/uploads/YEAR/MONTH/DAY/HashOfFile.extension

I´ve already read this article, but i didn´t found any solution. https://laravel.com/docs/5.3/requests#retrieving-uploaded-files

Regards,

0 likes
1 reply
anon34905's avatar

Hm. Got something like this.

Any way to set the hasName and store this in a database?

request()->file('video')->store('videos/' .date_format($time, 'Y').'/'.date_format($time, 'm').'/'.date_format($time, 'd'));

Please or to participate in this conversation.