Uploading csv to backend to process and display results
See original GitHub issueI would like to know how can i upload a csv file
through stipple to the backend for processing?
Currently, I am working with the example provided by @essenciary which can display a random dataframe to the frontend. However, I want client users to upload their own csv file.
Example Script:
using Genie, Stipple
using StippleUI
using DataFrames
dt = DataFrame(rand(10,2), ["x1", "x2"])
dt_opts = DataTableOptions(columns = [Column("x1"), Column("x2", align = :right)])
# WEB_TRANSPORT = Genie.WebThreads #for AJAX/HTTP
@reactive mutable struct APP <: ReactiveModel
data::R{DataTable} = DataTable()
data_pagination::DataTablePagination = DataTablePagination(rows_per_page=50)
end
function handlers(model)
on(model.isready) do isready
isready || return
model.data[] = DataTable(dt, dt_opts)
end
model
end
function ui(model::APP)
page(model,
[
heading("Dashboard")
row([
cell(class="st-module", [
h4("Dataset")
# add your table logic here:
table(:data;
pagination=:data_pagination,
style="height: 350px;"
#dense=true, flat=true,
)
])
])
])
end
route("/") do
APP |> init |> handlers |> ui |> html
end
up(9000)
Thanks would highly appreciate the help! Look forward to the suggestions.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Node Express Endpoint to Upload and Process CSV File
In this post, we will upload a CSV file, store it temporarily in the server directory to fetch all rows in JSON form,...
Read more >Importing and Working with CSV Files in SQL Server
Step 1: Selecting the database · Step 2: Select the file to import · Step 3: Preview the data · Step 4: Modify...
Read more >How to import CSV data into Backendless and inspect the ...
This video demonstrates how to import CSV data into the Backendless database.The import file can be downloaded ...
Read more >Node.js: Upload CSV file data to Database
In this tutorial, I will show you how to upload/import CSV file data into MySQL Database using Node. js Express & fast-csv.
Read more >5 Ways to Convert CSV Files to Databases Quickly
ConvertCSV gives you options to paste the data in, upload a file locally, or input a URL where the CSV data is located....
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 Free
Top 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
In this discussion you can find an example of uploading a file.
It will be great if there is an example demonstrating how you can upload and process a CSV file.
For example, it will be nice to show you can upload a custom CSV file to perform k-means clustering using the example https://github.com/GenieFramework/StippleDemos/tree/master/IrisClustering but uploading . The CSV file should be uploaded using for example https://github.com/GenieFramework/StippleDemos/tree/master/BasicExamples/CsvUpload