-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Media Manager files from S3 #326
Comments
Here is the code im using for the scan.php:
|
Hi Thank you. What is the output of scan php? Is the output json valid? You can check the json with something like https://jsonviewer.stack.hu/ At first glance I see that the js error is caused by Make sure that 'path' => $item ?? '', or 'path' => (string) $item, You can also try changing items from null to empty array 'items' => $isDirectory ? $scan($item) : [], In the demo scan.php the output format is {
"name": "",
"type": "folder",
"path": "",
"items": [
{
"name": "15.jpg",
"type": "file",
"path": "\\/15.jpg",
"size": 135553
},
{
"name": "2.jpg",
"type": "file",
"path": "\\/2.jpg",
"size": 87295
},
{
"name": "4.jpg",
"type": "file",
"path": "\\/4.jpg",
"size": 225688
},
{
"name": "5.jpg",
"type": "file",
"path": "\\/5.jpg",
"size": 158339
},
{
"name": "6.jpg",
"type": "file",
"path": "\\/6.jpg",
"size": 149161
},
{
"name": "7.jpg",
"type": "file",
"path": "\\/7.jpg",
"size": 57618
},
{
"name": "mountains",
"type": "folder",
"path": "\\/mountains",
"items": [
{
"name": "1.jpg",
"type": "file",
"path": "\\/mountains\\/1.jpg",
"size": 72587
},
{
"name": "12.jpg",
"type": "file",
"path": "\\/mountains\\/12.jpg",
"size": 130542
},
{
"name": "3.jpg",
"type": "file",
"path": "\\/mountains\\/3.jpg",
"size": 126297
}
]
},
{
"name": "sample.webm",
"type": "file",
"path": "\\/sample.webm",
"size": 1404516
},
{
"name": "sample.webp",
"type": "file",
"path": "\\/sample.webp",
"size": 5138
}
]
} You can use this output temporarily as dummy output in your scan.php to check if the error is caused by scan.php or by something else. |
Hey thanks a lot! |
Hi there, great work! I am integrating with Laravel and have it working. The only hang up I have is getting files from S3 disk or even locally, I get "undefined
media.js:409 Uncaught TypeError: Cannot read properties of undefined (reading 'split')"
I cant seem to figure the pattern, when i log dir variable its undefined, if you could provide any context on the media manager that would be great!
And thanks for the hard work!
The text was updated successfully, but these errors were encountered: