Hi, so what is $dropbox_file? an object or an array?
$dropbox_file->id // object
$dropbox_file->name // object
$dropbox_file->size // object
$dropbox_file[".tag"] // array
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi
I've got the following routine and I would like to know if the .tag = "folder" or not!
Any help on me fixing this:
$file = new \stdClass();
$file->id = $dropbox_file->id;
$file->name = $dropbox_file->name;
$file->size = \StringHelpers::formatBytes($dropbox_file->size);
#$file->tag = $dropbox_file['.tag'];
if ($dropbox_file[".tag"] == 'folder') {
$file->tag = 'folder';
}else {
$file->tag = 'file';
}
I cannot get $dropbox_file['.tag'] or $dropbox_file[".tag"]
Thanks in advance Carl.
Solved it!
We have implemented this routine with an addon which excludes all the .tag attributes so I was chasing my tail!
Cheers Carl.
Please or to participate in this conversation.