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

Fix remove file on initial comment (#20127) #20128

Merged
merged 2 commits into from
Jun 25, 2022

Conversation

Gusted
Copy link
Contributor

@Gusted Gusted commented Jun 24, 2022

- Backport go-gitea#20127
  - Store the file uuid(which is returned by Gitea in the upload file response) onto the file object, so it can be used for the remove feature to specify this file.
  - Resolves go-gitea#20115
@Gusted Gusted added this to the 1.17.0 milestone Jun 24, 2022
@tyroneyeh
Copy link
Contributor

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 25, 2022
@Gusted
Copy link
Contributor Author

Gusted commented Jun 25, 2022

Does it need to be changed here?
https://github.com/go-gitea/gitea/blob/main/web_src/js/features/repo-legacy.js#L303

Nope, they got another mechanism to delete the files(they don't use the delete attachment feature). Instead when you edit a comment(that function gets triggered) and you delete a file and save that comment it will send which files's UUID are still "active".

@tyroneyeh
Copy link
Contributor

Does it need to be changed here?
https://github.com/go-gitea/gitea/blob/main/web_src/js/features/repo-legacy.js#L303

Nope, they got another mechanism to delete the files(they don't use the delete attachment feature). Instead when you edit a comment(that function gets triggered) and you delete a file and save that comment it will send which files's UUID are still "active".

However, when editing a comment, uploading a new file and then deleting the file will also cause an error.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 25, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 25, 2022
@zeripath zeripath merged commit 0b7b342 into go-gitea:release/v1.17 Jun 25, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants