--- title: 實作上傳檔案所讀資料 tags: Learning note --- ## 實作上傳檔案所讀資料 - [node stream](https://www.eebreakdown.com/2016/10/nodejs-streams.html) - [stream and pipe](https://ithelp.ithome.com.tw/articles/10221119) - [crypto](http://nodejs.cn/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options) - [express-file-upload](https://github.com/bezkoder/express-file-upload) - [NFT storage](https://ipfs-shipyard.github.io/nft.storage/client/classes/NFTStorage.html#storeBlob) - Multer - [fs](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) ### 筆記 - blob - Blob Blob(Binary Large Object)類型的物件是一個不可變的原始資料(Immutable Raw Data),類似檔案的二進制資料,通常像是一些圖片、音訊或者是可執行的二進制程式碼也可以被儲存為 Blob。 Blob 的 constructor 接受兩個參數,第一個是實際資料的陣列,第二個則是資料的類型,但這兩個參數不是必須的 [網址](https://jiepeng.me/2018/04/17/use-blob-and-file-web-api-create-upload-image-preview-immediately) - multer - multer不支援使用 HTTP:PUT - form method, enctype - ajax send FormData - 上傳檔案使用套件 multiparty ### 程式流程 - 使用套件 multiparty 上傳檔案cc - 使用套件 crypto 將上傳檔案加密 - 將加密後檔案上傳至 IPFS ### 加解密資料 https://stackoverflow.com/questions/27345839/node-js-encrypts-large-file-using-aes 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up