alvazz / ohohmnm
A Media Manager Built With Vuejs & Laravel
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 186
Language:JavaScript
Requires
- php: ~7.0
- illuminate/support: 5.4 - 5.8
- maennchen/zipstream-php: ~1.0
Suggests
- league/flysystem-cached-adapter: Required to use the Flysystem cache (~1.0).
- dev-master
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.16
- v3.3.15
- v3.3.14
- v3.3.13
- v3.3.12
- v3.3.11
- v3.3.10
- v3.3.9
- v3.3.8
- v3.3.7
- v3.3.6
- v3.3.5
- v3.3.4
- v3.3.3
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.9
- v3.2.8
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.9
- v2.5.8
- v2.5.7
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.0
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2025-02-15 02:01:59 UTC
README
Laravel Media Manager
- to optimize uploaded files on the fly try spatie
Installation
-
composer require alvazz/media-manager
-
(Laravel < 5.5) add the service provider to
config/app.php
'providers' => [ alvazz\MediaManager\MediaManagerServiceProvider::class, ]
-
publish the package assets with
php artisan vendor:publish --provider="alvazz\MediaManager\MediaManagerServiceProvider"
-
after installation, package will auto-add
- package routes to
routes/web.php
- package assets compiling to
webpack.mix.js
- package routes to
-
yarn add vue vue-ls vue-async-computed vue-list-rendered vue-image-compare2 vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js # or npm install vue vue-ls vue-async-computed vue-list-rendered vue-image-compare2 vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js --save
-
add this one liner to your main js file and run
npm run watch
to compile yourjs/css
files.- if you are having issues Check.
// app.js window.Vue = require('vue') // pre Laravel v5.7 require('../vendor/MediaManager/js/manager') // Laravel v5.7 // require('../assets/vendor/MediaManager/js/manager') new Vue({ el: '#app' })
Features
-
multi
- upload
- move/copy
- delete
-
upload by either
- using the upload panel
- drag & drop anywhere
- click & hold on an empty area "items container"
-
toggle between
random/original
names for uploaded files -
upload an image from a url
-
bulk selection
-
change item/s visibility
-
update the page url while navigation
-
show audio files info "artist, album, year, etc.."
-
download selected "including bulk selection"
-
directly copy selected file link
-
use the manager + from modal + with any wysiwyg editor
-
auto scroll to selected item using "left, up, right, down, home, end"
-
lock/unlock item/s.
-
search in the current folder or globally through the entire collection.
-
filter by
- folder
- image
- audio
- video
- text/pdf
- application/archive
- locked items
- selected items
-
sort by
- name "default"
- size
- last modified
-
items count for
- all
- selected
- search found
-
contents ratio bar
-
protection against overwriting (files/folders)
-
file name sanitization for
- upload
- rename
- new folder
-
auto-play media files "if selected filter is audio/video"
-
disable/enable buttons depend on the usage to avoid noise & keep the user focused
-
shortcuts / gestures
- if no more rows available, pressing
down
will go to the last item in the list "same as native finder". - when viewing a
audio/video
file in the preview card, pressingspace
will play/pause the item instead of closing the modal. - dbl click/tap
- any file of type
audio/video
when sidebar is hidden, will open it in the preview card "same as images". - any file of type
application/archive
will download it.
- any file of type
- all the left/right gestures have their counterparts available as well.
- pressing
esc
while using the image editor wont close the modal but you can dbl click/tap themodal background
to do so. "to avoid accidentally canceling your changes".
* the info sidebar is only available on big screens "> 1087px".
* to stop interfering with otherkeydown
events you can toggle the manager listener through
EventHub.fire('disable-global-keys', true/false)
.
- if no more rows available, pressing
-
events
Config
config/mediaManager.php
return [ /* * ignore files pattern */ 'ignore_files' => '/^\..*/', /* * filesystem disk */ 'storage_disk' => 'public', /* * manager controller */ 'controller' => '\alvazz\MediaManager\Controllers\MediaController', /* * remove any file special chars except */ 'allowed_fileNames_chars' => '.\_\-\'\s\(\)\,', /* * remove any folder special chars except (_ -) */ 'allowed_folderNames_chars' => '\_\-', /* * disallow uploading files with the following mimetypes * https://www.iana.org/assignments/media-types/media-types.xhtml */ 'unallowed_mimes' => ['php', 'java'], /* * extra mime-types */ 'extended_mimes' => [ 'image' => [ 'binary/octet-stream', ], 'archive' => [ 'application/x-tar', 'application/zip', ], ], /* * when file names gets cleand up */ 'sanitized_text' => 'uniqid', /* * display file last modification time as * http://carbon.nesbot.com/docs/#api-formatting */ 'last_modified_format' => 'toDateString', /** * hide file extension in files list */ 'hide_files_ext' => true, /* * load image preview only when item is clicked ? */ 'lazy_load_image_on_click' => false, /* * automatically invalidate cache after "in Minutes" */ 'cache_expires_after' => 60, /* * in-order to get the folder items count & size * we need to recursively get all the files inside the folders * which could make the request take longer */ 'get_folder_info' => true, /** * do you want to enable broadcasting the changes * made by one user to others ? * * "laravel-echo" must be installed */ 'enable_broadcasting' => false, /** * show "an itunes like" content ratio bar */ 'show_ratio_bar' => true ];
Usage
- visit
localhost:8000/media