drawio-nextcloud icon indicating copy to clipboard operation
drawio-nextcloud copied to clipboard

Create new file does not ask for filename

Open arnowelzel opened this issue 1 year ago • 3 comments

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 avatar Apr 07 '24 11:04 arnowelzel

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);
	}
...
}

arnowelzel avatar Apr 07 '24 11:04 arnowelzel

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

github-actions[bot] avatar Feb 02 '25 04:02 github-actions[bot]

This problem still exists. Any feedback?

arnowelzel avatar Feb 02 '25 09:02 arnowelzel