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

Reset attachment folder when it cannot be created #3794

Conversation

nickvergessen
Copy link
Member

Fix #3590

@nickvergessen
Copy link
Member Author

cc @Dubidubiduu

@nickvergessen
Copy link
Member Author

/backport to stable19

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the code correctly, it should fix the bug. 👍
But didn't test.

Copy link

@Dubidubiduu Dubidubiduu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I can share an already uploaded picture. But upload a new one just into the chat doesn't work for me.

@nickvergessen
Copy link
Member Author

Yeah because you dont have any quota you can of course not upload files

@nickvergessen nickvergessen merged commit dd05346 into master Jun 10, 2020
@nickvergessen nickvergessen deleted the bugfix/3590/change-attachment-folder-when-it-cannot-be-created branch June 10, 2020 15:12
@nickvergessen
Copy link
Member Author

@Dubidubiduu this will be further handled in #3430

@@ -96,9 +92,16 @@ protected function publishInitialStateForUser(IUser $user, IRootFolder $rootFold
$userFolder->newFolder($attachmentFolder);
}
} catch (NotPermittedException $e) {
$attachmentFolder = '/';
$this->serverConfig->setUserValue($user->getUID(), 'spreed', 'attachment_folder', '/');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickvergessen is there a way to do this via occ?
I would think about some command like:
occ config:system:set spreed attachment_folder --value="/" --user="exampleuser"
or
occ config:app:set spreed attachment_folder --value="/" --user="exampleuser"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, it is not needed here, since it will work now, but I would like to use it via cli to set it automatically to another value for my users...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: upload & shares & voice 📤🎙️ Sharing files into a chat and audio recordings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot change the upload directory if the root folder is read only
3 participants