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 keep folder on reupload #17744

Merged
merged 10 commits into from Mar 21, 2023
Merged

Fix keep folder on reupload #17744

merged 10 commits into from Mar 21, 2023

Conversation

Nitwel
Copy link
Member

@Nitwel Nitwel commented Mar 8, 2023

The problem was that the api would override the folder field, because it didn't existed in the payload but the case that the item already exists and has a folder wasn't considered.

Fixes #17427 Fixes: ENG-659

@Nitwel Nitwel requested a review from a team March 8, 2023 14:03
@Nitwel Nitwel self-assigned this Mar 8, 2023
@Nitwel Nitwel requested review from paescuj, rijkvanzanten and jaads and removed request for a team March 8, 2023 14:03
api/src/services/files.ts Outdated Show resolved Hide resolved
Copy link
Member

@jaads jaads left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected

@jaads jaads merged commit 022d77d into main Mar 21, 2023
5 checks passed
@jaads jaads deleted the fix-17427 branch March 21, 2023 15:17
@azrikahar azrikahar added this to the Next Release milestone Mar 21, 2023
meditadvisors pushed a commit to ciso360ai/directus-mod that referenced this pull request May 13, 2023
* Fix deleting data on reupload

* only update folder when necessary

* run linter

* fix replacing filename_download and title

* run linter

* fix if statement

* clean up code

* Remove unused import of 'File'

* cleanup code

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replacing files doesn't keep the correct folder
4 participants