public function getCurrentPath()
    {

        // if no filepath defined => autocreate path from table name
        if (!static::$filepath) {
            static::$filepath = "files/" . $this->getTable();
        }

        static::$currentPath = public_path(static::$filepath . '/' . $this->id);

        if (!is_dir(static::$currentPath)) {
            try {
                @mkdir(static::$currentPath, 0777, true);
            } catch (Exception $e) {
                Api::handleError($e);
            }
        }

        return static::$currentPath;
    }