-
Notifications
You must be signed in to change notification settings - Fork 104
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
Error creating new directories #24
Comments
GCS has no real concept of folder vs files, everything is really just an object. $newDir = $filesystem->createDir('new_directory_test');
var_dump($newDir);
var_dump($filesystem->listContents('new_directory_test'));
$objects = $filesystem->listContents();
foreach ($objects as $object) {
if ($object['path'] == 'new_directory_test') {
var_dump($object);
}
}
bool(true)
array(0) {
}
array(8) {
["type"]=>
string(3) "dir"
["dirname"]=>
string(0) ""
["path"]=>
string(18) "new_directory_test"
["timestamp"]=>
int(1463657952)
["mimetype"]=>
string(10) "text/plain"
["size"]=>
string(1) "0"
["basename"]=>
string(18) "new_directory_test"
["filename"]=>
string(18) "new_directory_test"
} The only thing which may be odd to elFinder is the mimetype. The upload() function calls Util::guessMimeType which returns 'text/plain' for empty string; so directories are created with mimetype 'text/plain'. If I create a folder via the GCS console, folders are created with mimetype 'application/x-www-form-urlencoded;charset=UTF-8'. I'm not 100% sure this would be the issue though. Could this also be related to #23 |
I think it could have been connected the the bucket ACL, but I can't remember |
Can you please test if this is still happening, so that we can mark this as resolved? |
Sorry, I'll try and check this week for you. |
Using elFinder to create a new directory in the root of a bucket, an error is thrown.
Whilst elFinder shows an error, the directory is actually created in the GCS (checked using the GCS console).
I think the problem is with this adapter though.
In the
upload()
method,uploadType
is always set asmedia
which may cause a conflict with elFinder.It also seems to always want to set
data
to$contents
, which is passed an empty string viacreateDir()
which again is likely to cause issues?The text was updated successfully, but these errors were encountered: