fangwenxue
V2EX  ›  问与答

cf worker 上传文件损坏?

  •  
  •   fangwenxue · Mar 3, 2021 · 967 views
    This topic created in 1908 days ago, the information mentioned may be changed or developed.
    curl xxx -F "[email protected]"
    
    const formData = await request.formData()
    const body = formData.get('file')
    console.log(body)
    
    // const reader = request.body.getReader()
    // const body = request.body
    
    const token = await getAccessToken()
    const response = await fetch(url, {
    method: 'PUT',
    headers: {
    Authorization: `Bearer ${token}`,
    ...request.headers
    },
    body: body
    })
    
    • 对比了源文件跟上传的文件
    • 这是乱码了?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4326 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 01:01 · PVG 09:01 · LAX 18:01 · JFK 21:01
    ♥ Do have faith in what you're doing.