{"id":41752023,"url":"https://github.com/tomorrow56/m5stackwifiuploader","last_synced_at":"2026-01-31T04:02:36.817Z","repository":{"id":328250344,"uuid":"1111940658","full_name":"tomorrow56/M5StackWiFiUploader","owner":"tomorrow56","description":"WiFi-based file upload library for M5Stack with SD card support. Upload photos, binary data, and text files via HTTP with a web interface.","archived":false,"fork":false,"pushed_at":"2026-01-27T20:33:21.000Z","size":3546,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-27T23:40:18.714Z","etag":null,"topics":["arduino","embedded","esp32","file-upload","iot","m5stack","sd-card","wifi"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/tomorrow56.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2025-12-07T22:59:58.000Z","updated_at":"2026-01-27T20:33:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tomorrow56/M5StackWiFiUploader","commit_stats":null,"previous_names":["tomorrow56/m5stackwifiuploader"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tomorrow56/M5StackWiFiUploader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorrow56%2FM5StackWiFiUploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorrow56%2FM5StackWiFiUploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorrow56%2FM5StackWiFiUploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorrow56%2FM5StackWiFiUploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomorrow56","download_url":"https://codeload.github.com/tomorrow56/M5StackWiFiUploader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorrow56%2FM5StackWiFiUploader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28928660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T02:59:34.861Z","status":"ssl_error","status_checked_at":"2026-01-31T02:59:05.369Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arduino","embedded","esp32","file-upload","iot","m5stack","sd-card","wifi"],"created_at":"2026-01-25T01:15:44.622Z","updated_at":"2026-01-31T04:02:36.812Z","avatar_url":"https://github.com/tomorrow56.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# M5Stack WiFi File Uploader\n\n[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)](https://github.com/tomorrow56/M5StackWiFiUploader)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Platform](https://img.shields.io/badge/platform-ESP32-lightgrey.svg)](https://www.espressif.com/en/products/socs/esp32)\n\n**M5StackのSDカードにWiFi経由でファイルをアップロードするためのArduinoライブラリです**\n\nこのライブラリは、M5Stackデバイス上でHTTP/WebSocketサーバーを起動し、ブラウザ経由で写真、バイナリ、テキストファイルなどをSDカードに直接アップロードする機能を提供します。プログレス表示、自動再試行、エラーハンドリングなど、ファイル転送を実現するために必要な機能を備えています。\n\n[English Version](README_EN.md)\n\n## 主な特徴\n\n- **デュアルプロトコル対応**: 高速なWebSocketと互換性の高いHTTPの両方をサポート\n- **エラーハンドリング**: 14種類のエラーコードと自動再試行機能\n- **プログレス表示**: 転送速度、残り時間、全体進捗などをリアルタイムで追跡\n- **モダンWeb UI**: ドラッグ＆ドロップ対応のレスポンシブなWebインターフェース\n- **柔軟な設定**: ファイルサイズ、拡張子、同時アップロード数などを自由に設定可能\n- **コールバック**: アップロードの各段階（開始、進捗、完了、エラー）でカスタム処理を実行可能\n- **操作の制御**: アップロードの一時停止、再開、キャンセルが可能\n- **ファイルダウンロード**: SDカード内のファイルをWeb UI経由でダウンロード可能\n- **ファイル一覧表示**: ファイル名、サイズ、更新日時を表形式で表示\n- **軽量設計**: ESP32の標準ライブラリを中心に構成され、外部依存を最小限に抑制\n\n## 対応モデル\n\n- M5Stack Core\n- M5Stack Core2\n- M5Stack CoreS3\n\n## 依存ライブラリ\n\n- **M5Unified** 0.2.11以降\n- `WiFi`, `WebServer`, `FS`, `SD` (ESP32 Arduinoライブラリに内蔵)\n- `WebSocketsServer`\n- `ArduinoJson`\n\n## システム構成\n\n![system diagram](img/system.png)\n\n## クラス構成\n\n![class diagram](img/class.png)\n\n## インストール\n\n1.  リリースページから最新版の `M5StackWiFiUploader.zip` をダウンロードします。\n2.  Arduino IDEで `スケッチ` -\u003e `ライブラリをインクルード` -\u003e `.ZIP形式のライブラリをインストール` を選択します。\n3.  ダウンロードしたZIPファイルを選択してインストールします。\n\n## 使い方\n\n基本的な使い方は `examples/FullFeaturedDemo/FullFeaturedDemo.ino` を参照してください。\n\n```cpp\n#include \u003cM5Unified.h\u003e\n#include \u003cWiFi.h\u003e\n#include \"M5StackWiFiUploader.h\"\n#include \"SDCardManager.h\"\n\nconst char* WIFI_SSID = \"your_ssid\";\nconst char* WIFI_PASSWORD = \"your_password\";\n\nM5StackWiFiUploader uploader;\n\nvoid setup() {\n    auto cfg = M5.config();\n    M5.begin(cfg);\n    Serial.begin(115200);\n    \n    // SDカード初期化\n    if (!SDCardManager::initialize()) {\n        Serial.println(\"SD Card initialization failed!\");\n        return;\n    }\n    \n    // WiFi接続\n    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);\n    while (WiFi.status() != WL_CONNECTED) { \n        delay(500); \n        Serial.print(\".\");\n    }\n    Serial.println(\"\\nWiFi Connected!\");\n\n    // WebSocketを有効化\n    uploader.enableWebSocket(true);\n\n    // アップローダーを開始\n    if (uploader.begin(80, \"/uploads\")) {\n        Serial.println(\"Server started successfully!\");\n        Serial.printf(\"Server URL: http://%s\\n\", WiFi.localIP().toString().c_str());\n    }\n\n    // コールバック設定\n    uploader.onUploadComplete([](const char* filename, uint32_t size, bool success) {\n        if (success) {\n            Serial.printf(\"Upload complete: %s\\n\", filename);\n        }\n    });\n}\n\nvoid loop() {\n    M5.update();\n    uploader.handleClient();\n}\n```\n\n## ファイルダウンロード機能\n\n### 主な機能\n\n- **ファイル一覧表示**: SDカード内のファイルを表形式で表示\n- **詳細情報表示**: ファイル名、サイズ、更新日時を確認\n- **ダウンロード**: ファイルをローカルにダウンロード\n- **削除**: 不要なファイルを削除\n- **更新**: ファイル一覧を手動で更新\n\n### Web UI\n\nWeb UIでは、以下の情報が表示されます：\n\n| 項目 | 説明 |\n|------|------|\n| ファイル名 | クリックでダウンロード |\n| サイズ | 人間が読みやすい形式（KB, MB） |\n| 更新日時 | YYYY-MM-DD HH:MM形式 |\n| 操作 | ダウンロード・削除ボタン |\n\n### API エンドポイント\n\n| エンドポイント | メソッド | 説明 |\n|---------------|---------|------|\n| `/api/files/list` | GET | 詳細なファイル一覧取得 |\n| `/api/download` | GET | ファイルダウンロード |\n\n#### `/api/files/list` レスポンス例\n\n```json\n{\n  \"files\": [\n    {\n      \"name\": \"photo.jpg\",\n      \"size\": 1024000,\n      \"modified\": 1702123456,\n      \"isDirectory\": false,\n      \"extension\": \"jpg\"\n    }\n  ],\n  \"total\": 1\n}\n```\n\n#### `/api/download` パラメータ\n\n- `filename`: ダウンロードするファイル名\n\n例: `/api/download?filename=photo.jpg`\n\n### セキュリティ\n\n- パストラバーサル攻撃を防止（`..`, `/`, `\\`を含むファイル名を拒否）\n- ファイル存在チェック\n- Content-Dispositionヘッダーによる適切なファイル名設定\n\n## 関連ドキュメント\n\n- **[APIリファレンス](docs/API_REFERENCE_v1.3.md)**\n- **[FAQ](docs/TROUBLESHOOTING.md)**\n- **[Exampleの説明](examples/README.md)**\n\n## 貢献\n\nバグ報告や機能提案は [GitHub Issues](https://github.com/tomorrow56/M5StackWiFiUploader/issues) までお願いします。\n\n## ライセンス\n\nこのライブラリは **MITライセンス** の下で公開されています。詳細は `LICENSE` ファイルを参照してください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomorrow56%2Fm5stackwifiuploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomorrow56%2Fm5stackwifiuploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomorrow56%2Fm5stackwifiuploader/lists"}