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(example-file-upload): add an example for file upload with LoopBack 4 #4801

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Mar 5, 2020

An example app for file upload.

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@raymondfeng raymondfeng requested a review from bajtos as a code owner March 5, 2020 23:00
@raymondfeng raymondfeng force-pushed the example-file-upload branch 3 times, most recently from 733cf6a to c2335f7 Compare March 6, 2020 00:39
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

Thanks @raymondfeng for creating this example!
I wonder if it would be better to somehow show what got uploaded even it's in memory. I tried the example but I don't know a way to verify it actually got uploaded, or maybe I'm just missing something. :)

examples/file-upload/README.md Show resolved Hide resolved
@bajtos
Copy link
Member

bajtos commented Mar 6, 2020

I wonder if it would be better to somehow show what got uploaded even it's in memory. I tried the example but I don't know a way to verify it actually got uploaded

+1 to add a way for inspecting the uploaded files

@dhmlau dhmlau added the Examples label Mar 6, 2020
@raymondfeng raymondfeng force-pushed the example-file-upload branch 2 times, most recently from acbf740 to ee5b949 Compare March 6, 2020 17:18
@raymondfeng
Copy link
Contributor Author

I switch to diskStorage as the default now. Uploaded files will show up in .sandbox folder under the application root directory.

Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

LGTM once the upload location is updated in code or README.

examples/file-upload/README.md Outdated Show resolved Hide resolved
@raymondfeng raymondfeng force-pushed the example-file-upload branch 3 times, most recently from 283b8a0 to 4cfbe3f Compare March 6, 2020 19:09
@raymondfeng raymondfeng force-pushed the example-file-upload branch 2 times, most recently from b1e3623 to 5806d0d Compare March 6, 2020 20:31
@dhmlau dhmlau mentioned this pull request Mar 6, 2020
4 tasks
@hacksparrow
Copy link
Contributor

A suggestion for future example apps. The changes required for the example should be in a separate commit, so we have a good visibility about the amount of changes that goes into making the feature work.

@raymondfeng raymondfeng force-pushed the example-file-upload branch from 5806d0d to 7bd0521 Compare March 7, 2020 18:00
@raymondfeng raymondfeng requested a review from hacksparrow March 7, 2020 18:00
@raymondfeng raymondfeng force-pushed the example-file-upload branch 8 times, most recently from 01013af to 7deceb6 Compare March 7, 2020 23:24
@raymondfeng raymondfeng force-pushed the example-file-upload branch from 7deceb6 to d3f5cd3 Compare March 9, 2020 16:36
Copy link
Contributor

@jannyHou jannyHou left a comment

Choose a reason for hiding this comment

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

Tested on local LGTM 👍

@raymondfeng raymondfeng force-pushed the example-file-upload branch from d3f5cd3 to 33abb04 Compare March 9, 2020 22:06
@raymondfeng raymondfeng merged commit 9449724 into master Mar 9, 2020
@raymondfeng raymondfeng deleted the example-file-upload branch March 9, 2020 22:35
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.

5 participants