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

API Endpoint upload files to s3 #2278

Merged
merged 4 commits into from
Sep 11, 2024
Merged

Conversation

kkwangsir
Copy link
Contributor

summary:

  • install AWSSDK.S3
  • has a api endpoint to upload to s3, in local we need
S3_ACCESS_KEY
S3_SECRET_KEY
S3_BUCKET_NAME
S3_SERVICE_URL

I have the same variables in openshift

  • call api you may want to set the limit numbers of files and updatedBefore of for filter

[ProducesResponseType(typeof(Dictionary<string, List<string>>), (int)HttpStatusCode.OK)]
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)]
[SwaggerOperation(Tags = new[] { "Storage" })]
public async Task<IActionResult> UploadFilesToS3([FromQuery] DateTime? updatedBefore = null, [FromQuery] int? limit = null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can set the parameter default value here:
[FromQuery] int? limit = 100

Copy link
Collaborator

@JacobWang-bc JacobWang-bc Sep 11, 2024

Choose a reason for hiding this comment

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

sometime we don't pass limit into it, but we can change it later. this PR's purpose is to test upload from dev server.

@laidaoyu
Copy link
Collaborator

looks good to me

@JacobWang-bc JacobWang-bc added the enhancement New feature or request label Sep 11, 2024
@JacobWang-bc JacobWang-bc merged commit 8392167 into bcgov:dev Sep 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants