Example code for uploading files
See original GitHub issueFrom the documentation https://chonky.io/docs/2.x/file-actions/built-in-actions i can see that ChonkyActions.UploadFiles
just adds a button to the UI and we have to define the actions related to it, but i am finding it a little difficult on how to actually define that actions, can we have some starter/example code for handling the upload button ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
PHP File Upload - W3Schools
With PHP, it is easy to upload files to the server. However, with ease comes danger, ... The "upload.php" file contains the code...
Read more >HTML File Upload Tutorial with Example • Fileschool - Filestack
A basic tutorial on how to upload a file with an HTML form. Includes a code example and discusses some options for how...
Read more >PHP - File Uploading - Tutorialspoint
PHP - File Uploading, A PHP script can be used with a HTML form to allow users to upload files to the server....
Read more >How to Upload a File in PHP (With an Example) - Code
We're going to create two PHP files: index.php and upload.php. The index.php file holds code which is responsible for displaying the file upload...
Read more >Uploading Files - Happy Coding
That's because file uploading requires slightly more complicated code than handling basic text input. This tutorial goes through what we need to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I came across this case too, let me try to help you out with this one. If we look at https://chonky.io/docs/2.x/file-actions/action-handler we understand that we can write our own handler functions based on Chonky action id,
ChonkyActions.UploadFiles.id
. I’m using TS for Chonky.First we need to define the default actions (which you should have alrdy done to see the upload button):
Then, define the handlers for
ChonkyActions.UploadFiles
Not sure if this is a neater way of working on it, if there’s feel free to comment on this. I hope it helps you.
For anyone looking for example implementation with drag-n-drop: https://github.com/ProjektTejas/tejas-web/blob/master/components/dataset.tsx