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

Add File element type for File Upload #229

Merged
merged 9 commits into from
Aug 18, 2023
Merged

Add File element type for File Upload #229

merged 9 commits into from
Aug 18, 2023

Conversation

asimonok
Copy link
Collaborator

@asimonok asimonok commented Aug 17, 2023

Resolves #122

Screenshot 2023-08-18 at 10 59 19

@asimonok asimonok self-assigned this Aug 17, 2023
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.50% 🎉

Comparison is base (6a0d092) 97.21% compared to head (c9caeaf) 97.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   97.21%   97.71%   +0.50%     
==========================================
  Files          48       48              
  Lines         789      833      +44     
  Branches      142      153      +11     
==========================================
+ Hits          767      814      +47     
+ Misses         11        8       -3     
  Partials       11       11              
Files Changed Coverage Δ
src/constants/form-element.ts 100.00% <ø> (ø)
src/constants/request.ts 100.00% <ø> (ø)
src/constants/tests.ts 100.00% <ø> (ø)
src/components/ElementEditor/ElementEditor.tsx 100.00% <100.00%> (ø)
src/components/FormElements/FormElements.tsx 96.34% <100.00%> (+0.23%) ⬆️
src/components/FormPanel/FormPanel.tsx 92.94% <100.00%> (+0.17%) ⬆️
src/utils/form-element.ts 97.91% <100.00%> (+6.42%) ⬆️
src/utils/request.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mikhail-vl mikhail-vl added the enhancement New feature or request label Aug 17, 2023
@mikhail-vl mikhail-vl self-requested a review August 17, 2023 10:15
@mikhail-vl mikhail-vl added this to the Version 3.2.0 milestone Aug 17, 2023
@asimonok asimonok marked this pull request as ready for review August 18, 2023 07:59
@mikhail-vl mikhail-vl changed the title Add File element type Add File element type for File Upload Aug 18, 2023
Copy link
Member

@mikhail-vl mikhail-vl left a comment

Choose a reason for hiding this comment

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

Looks great!

@mikhail-vl mikhail-vl merged commit 249e4b0 into main Aug 18, 2023
6 checks passed
@mikhail-vl mikhail-vl deleted the feat/file-upload branch August 18, 2023 22:04
@utkarshsalunkhe
Copy link

utkarshsalunkhe commented Aug 20, 2023

@mikhail-vl Please let me know how to use this file upload in my panel. Provide step-by-step instructions .

@mikhail-vl
Copy link
Member

mikhail-vl commented Aug 20, 2023

@utkarshsalunkhe It's going to be in the upcoming release.

If you want to try the CI Artifact, then just download, install and add the element File to the form.

@utkarshsalunkhe
Copy link

@mikhail-vl "After uploading a file from my local system to an API, what will the API send in response? Is it the path of the file? I want to send the path of the file to the backend." Is that correct?

@mikhail-vl
Copy link
Member

@utkarshsalunkhe The panel will send the file itself as Base64 if selected application/json type or as a binary in case of the form-data.

@vanimesh
Copy link

Can we get step by step instructions atleast one example so that it help us to use the element please ?

@mikhail-vl
Copy link
Member

@vanimesh We appreciate the interest and we will add examples in the relevant issues.

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.

Files upload
4 participants