Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I integrate for Model per Media. #11

Open
nyeyint opened this issue Aug 8, 2018 · 3 comments
Open

How can I integrate for Model per Media. #11

nyeyint opened this issue Aug 8, 2018 · 3 comments

Comments

@nyeyint
Copy link

nyeyint commented Aug 8, 2018

Awesome packages.

My problem is may be I have a "Post" model and one post may have may media like images,pdf,docx..etc.
I want to show only specific media for each post.

how can archive my problem with this package?
Thanks.

@nauvalazhar
Copy link
Member

Hi, for now, it can't, unless you use the search feature with the extension keyword. For example: .pdf, .png, .jpg and others.
I will try to implement it in the next feature. Thank you

@nyeyint
Copy link
Author

nyeyint commented Aug 8, 2018

Hi @nauvalazhar,

Thanks for your discussion.I happy to wait next feature.
I'm thinking about my problem with your package current version with specific directory per model.but its may work or not.I'm not sure.

Thanks!

@tpaksu
Copy link
Contributor

tpaksu commented Apr 25, 2019

if (request()->has('directory_name')) {
$directoryName = request()->get('directory_name', null);
}

This may be your entry point. You can open your window with that parameter or initialize your midia js instance with directory_name parameter

csrf_field: $("meta[name='csrf-token']").attr('content'),
directory_name: '',
dropzone: {},

This way you can use your post ID as a directory name. Didn't try, but it should work. The code says it overrides the directory name with the specified one if it's not set in config directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants