C
C
ChampionTommy2021-07-01 07:32:31
Laravel
ChampionTommy, 2021-07-01 07:32:31

How to remove folders after sending files to laravel + laravel medialibrary?

What is the point?
I want to make a custom library with files like CRUD. MediaLibrary won't let you send a file without creating a folder (folder = id in sql).
And it turns out that I send a file from the site, it ends up in the temp folder - %1% - file.txt and this %1% comes up with the following added files (%1%, %2%, %3% etc.) . Accordingly, instead of a library, I have some kind of porridge from "numbers"
Does it make sense to write bicycles or is it better to take the filesystem from Larka herself?
I wanted to simplify my task, but in fact only complicated it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2021-07-01
@ChampionTommy

There is no preloading of files in MediaLibary, but it can be done through an intermediate model.
Here you can peep the implementation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question