Skip to content
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

Create new file does not ask for filename #74

Open
arnowelzel opened this issue Apr 7, 2024 · 1 comment
Open

Create new file does not ask for filename #74

arnowelzel opened this issue Apr 7, 2024 · 1 comment

Comments

@arnowelzel
Copy link
Contributor

Nextcloud 28 introduced some changes which also affect how "new file" operations are handled, so Nextcloud will not ask for a filename any longer for Draw.io. Instead a file with a randum numer as postfix is created and then opened in Draw.io:

Create file via menu Result
image image

However for other apps, Nextcloud will ask for the name - as for example with the "Text" app, where you can edit the name, before the file is created and then opened:

Create file via menu Result
image image

I don't know exactly what has to be done to achieve this yet. But maybe we can find out what is going on when comparing the "Text" app with the Draw.io integration.

@arnowelzel
Copy link
Contributor Author

It seems, that the following parts of the "Text" app are responsible for this:

text/appinfo/routes.php:

return [
	'routes' => [
...
		/** @see Controller\SessionController::create() */
		['name' => 'Session#create', 'url' => '/session/{documentId}/create', 'verb' => 'PUT'],
	],
...
]

text/lib/Controller/SessionController.php:

class SessionController extends ApiController implements ISessionAwareController {
...
	#[NoAdminRequired]
	public function create(int $fileId = null, string $file = null): DataResponse {
		return $this->apiService->create($fileId, $file, null, null);
	}
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant