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

Adds use cases for uploading files through direct upload API #153

Merged
merged 45 commits into from
Jun 21, 2024

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented May 9, 2024

What this PR does / why we need it:

This PR includes the use cases to support file uploads through the Direct Upload API. These use cases are entirely based on the Direct Upload API, so for the review of this PR, I recommend to rely on: https://guides.dataverse.org/en/latest/developers/s3-direct-upload-api.html

Which issue(s) this PR closes:

Related PRs:

Special notes for your reviewer:

This PR does not incorporate use case functional tests because the tests are run outside the container network and we encountered issues with hostnames not being recognized for the generated destination URLs. However, coverage is still high, over 95%, and the different scenarios are tested with integration and unit tests.

Suggestions on how to test this:

Visual inspection of the code and unit and integration tests execution.

Additional documentation:

@GPortas GPortas changed the base branch from develop to 146-edit-dataset-use-case May 9, 2024 12:46
@GPortas GPortas changed the base branch from 146-edit-dataset-use-case to develop May 20, 2024 11:46
@GPortas GPortas marked this pull request as ready for review June 10, 2024 12:58
@GPortas GPortas changed the title Adds use case for uploading files through direct upload API Adds use cases for uploading files through direct upload API Jun 10, 2024
@g-saracca g-saracca self-assigned this Jun 12, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

First of all congratulations for such a great implementation and research about file uploading! 👏🏼
Overall the code looks very good and solid, I've left a few suggestions for minor improvements.

package.json Show resolved Hide resolved
src/files/domain/repositories/IFilesRepository.ts Outdated Show resolved Hide resolved
src/files/infra/clients/DirectUploadClient.ts Outdated Show resolved Hide resolved
src/files/infra/clients/DirectUploadClient.ts Outdated Show resolved Hide resolved
src/files/infra/clients/DirectUploadClient.ts Outdated Show resolved Hide resolved
src/files/infra/clients/DirectUploadClient.ts Show resolved Hide resolved
@g-saracca g-saracca assigned GPortas and unassigned g-saracca Jun 12, 2024
@GPortas GPortas requested a review from g-saracca June 13, 2024 09:27
@GPortas GPortas assigned g-saracca and unassigned GPortas Jun 13, 2024
Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@ekraffmiller
Copy link
Contributor

Looks good and all tests pass, merging!

@ekraffmiller ekraffmiller merged commit 7fa8961 into develop Jun 21, 2024
5 checks passed
@GPortas GPortas deleted the 152-direct-upload-files-use-case branch June 24, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create use case for uploading files via Direct Upload / S3
3 participants