ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

[feature] allow to use `restrict` param through modal component #139

Closed 4KDA closed 4 years ago

4KDA commented 4 years ago

Is your feature request related to a problem? Please describe. Not

Describe the solution you'd like I really want to be able to transfer the path to the folder that you need to open when you open the modal version of the manager (for example, the "path" property). And, if possible, a parameter forbidding to rise above the directory specified in the path parameter.

Additional context In the administrative part of the system that we are currently creating, there is a task to give the administrator the ability to download documents to folders for various users. In this case, by clicking on the opening of the manager, you must immediately open the folder of the user selected in the list in the manager. I would also like to have the opportunity to prohibit climbing in the directory Above with such an opening in order to exclude downloading to another folder due to the "human factor". Such an opportunity in your package would be very cool.

P.S. Sorry for my bad English

ctf0 commented 4 years ago

am not sure what u r after but check https://github.com/ctf0/Laravel-Media-Manager/wiki/Restrict-Access-To-Path

4KDA commented 4 years ago

There, this parameter is set in the blade, but I have a SPA application and I need the same opportunity for SPA.

I need this opportunity:

<media-modal item="gallery" :name="inputName" type="folder"></media-modal>
<input type="text" name="gallery" :value="gallery"/>
<button @click="toggleModalFor('gallery', 'users/admin/pdfs')">select gallery folder</button>

or

<media-modal item="gallery" :name="inputName" type="folder" path="users/admin/pdfs"></media-modal>

More interesting the first option, when a path is passed to the click event,

ctf0 commented 4 years ago

not possible,sorry

4KDA commented 4 years ago

It's a pity! :-(

ctf0 commented 4 years ago

might be added in next release

ctf0 commented 4 years ago

@4KDA plz test with the latest commit and reply back

update check wiki