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

feat: extend FileApi with the capability to query by the original file name #2109

Merged
merged 7 commits into from
Nov 15, 2023

Conversation

bossenti
Copy link
Contributor

@bossenti bossenti commented Oct 30, 2023

Purpose

This PR extends the FileAPI of the core and the client to query by the original file name.

Remarks

PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): no

@github-actions github-actions bot added java Pull requests that update Java code pipeline elements Relates to pipeline elements connect Related to the `connect` module (adapters) backend Everything that is related to the StreamPipes backend labels Oct 30, 2023
@bossenti
Copy link
Contributor Author

Would you rather like to see the IFileAPI interface untouched and simply extend the file client with an additional method or are you fine with the proposed solution?

@bossenti bossenti changed the title feat: extend FileApi with the capability to query by the original fil… feat: extend FileApi with the capability to query by the original file name Oct 30, 2023
@tenthe
Copy link
Contributor

tenthe commented Oct 30, 2023

Hey @bossenti,
I think it is ok to change the interface. But I would suggest to add a new method. Then it is not a breaking change for clients who already use the interface.
Further, I would suggest to rename the parameter of the existing methods to make clear that an internal id is used instead of the file name.

How can we deal with files that have the same name? Any ideas?

Cheers,
Philipp

@dominikriemer
Copy link
Member

How do we distinguish between files with the same original filename and which file will be delivered in this case? I think in this case we would need to ensure that no two files with the same filename can be uploaded.

@tenthe
Copy link
Contributor

tenthe commented Nov 3, 2023

@dominikriemer yes, I totally agree. I think we should make sure that there are no two files with the same name.
Currently, if a user uploads two files with the same name and wants to delete one of them, it is not clear which one is which.
I think the best solution for this is to only allow unique names.
But I would address this in a separate issue and PR.

@github-actions github-actions bot removed the connect Related to the `connect` module (adapters) label Nov 13, 2023
@bossenti
Copy link
Contributor Author

I have simplified the API a bit so that we don't have the adapt all usages of getFileContent.
Let's take the uniqueness of uploaded files as a follow-up issue.

@tenthe tenthe self-requested a review November 14, 2023 08:32
@bossenti bossenti added this to the 0.95.0 milestone Nov 15, 2023
@bossenti bossenti merged commit 2171682 into dev Nov 15, 2023
18 checks passed
@bossenti bossenti deleted the allow-original-file-name branch November 15, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Everything that is related to the StreamPipes backend java Pull requests that update Java code pipeline elements Relates to pipeline elements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants