{"id":19881591,"url":"https://github.com/chifisource/toolipsuploader.jl","last_synced_at":"2026-03-04T03:02:39.870Z","repository":{"id":40769869,"uuid":"508004826","full_name":"ChifiSource/ToolipsUploader.jl","owner":"ChifiSource","description":"A toolips file-uploader with server-side saving.","archived":false,"fork":false,"pushed_at":"2025-08-18T00:16:45.000Z","size":92,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T13:29:21.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChifiSource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["emmaccode","UnformalPenguin"]}},"created_at":"2022-06-27T17:36:54.000Z","updated_at":"2025-08-18T00:16:49.000Z","dependencies_parsed_at":"2025-08-17T21:15:05.540Z","dependency_job_id":"e1735d64-2b1f-41c5-ab66-6f8f24de3364","html_url":"https://github.com/ChifiSource/ToolipsUploader.jl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChifiSource/ToolipsUploader.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChifiSource%2FToolipsUploader.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChifiSource%2FToolipsUploader.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChifiSource%2FToolipsUploader.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChifiSource%2FToolipsUploader.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChifiSource","download_url":"https://codeload.github.com/ChifiSource/ToolipsUploader.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChifiSource%2FToolipsUploader.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:14:42.092Z","updated_at":"2026-03-04T03:02:39.856Z","avatar_url":"https://github.com/ChifiSource.png","language":"Julia","funding_links":["https://github.com/sponsors/emmaccode","https://github.com/sponsors/UnformalPenguin"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align = \"center\"\u003e\u003cimg src = \"https://github.com/ChifiSource/image_dump/blob/main/toolips/toolipsuploader.png\" href = \"https://toolips.app\"\u003e\u003c/img\u003e\u003c/div\u003e\n\n- [documentation](https://chifidocs.com/Toolips/ToolipsUploader)\n- [Toolips](https://github.com/ChifiSource/Toolips.jl)\n\n#### uploader\n`ToolipsUploader` demistifies the process of uploading files from the client to the server using a simple `ToolipsSession` extension alongside the `UploadMap`. This is more of an extension to `ToolipsSession` than it is base `Toolips`, and **requires the `Session` extension** to be loaded into your server.\n```julia\nusing Pkg\n\nPkg.add(\"ToolipsUploader\")\n\n# Latest breaking changes, sometimes broken or version mismatched\nPkg.add(\"ToolipsUploader\", rev = \"Unstable\")\n```\n###### explanation\nUploading is handled via three functions bound to the `UploadMap` using `bind`. These are `:init`, `:progress`, and `:complete`.\n```julia\nupm = ToolipsUploader.UploadMap()\nbind(upm, :complete) do cm::ComponentModifier\n    open(upl_path, \"w\") do o::IOStream\n        write(o, upl_data)\n    end\n    @info \"wrote file\"\n    push!(cm.changes, \"console.log('file written');\")\nend\n```\nThis is a minimal example, the following example is a full server and includes all features:\n```julia\nmodule ToolipsUploadExample\nusing Toolips\nusing Toolips.Components\nusing ToolipsUploader\nusing ToolipsSession\n\nmain = route(\"/\") do c::Connection\n    loader = ToolipsUploader.fileinput(\"sampy\")\n    upm = ToolipsUploader.UploadMap()\n    upl_path = \"\"\n    upl_data = \"\"\n\n    # init function\n    function upm_init(cm::ComponentModifier, num::Int64, value::AbstractString)\n        if ~(isfile(value))\n            touch(value)\n        end\n        upl_path = value\n        @info \"file upload $value started\"\n        push!(cm.changes, \"console.log('file upload started');\")\n    end\n    # progress function\n    function upmprog(cm::ComponentModifier, info::StreamFileInfo)\n        upl_data = upl_data * info.data\n        push!(cm.changes, \"console.log('uploaded $(info.loaded) of $(info.size)');\")\n    end\n    # complete function\n    bind(upm, :complete) do cm::ComponentModifier\n        open(upl_path, \"w\") do o::IOStream\n            write(o, upl_data)\n        end\n        @info \"wrote file\"\n        push!(cm.changes, \"console.log('file written');\")\n    end\n    # bind to other loader:\n    bind(upm_init, upm, :init)\n    bind(upm_init, upm, :upmprog)\n    new_button = button(\"trhh\", text = \"UPLOAD\")\n    Components.bind(new_button, loader)\n    Components.bind(c, loader, upm)\n    write!(c, h2(text = \"welcome to me uploader\"))\n    write!(c, loader, new_button)\nend\n\nSES = Session()\n\nexport SES, main, default_404\nend # module\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchifisource%2Ftoolipsuploader.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchifisource%2Ftoolipsuploader.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchifisource%2Ftoolipsuploader.jl/lists"}