fangwenxue
V2EX  ›  问与答

cf worker 上传文件损坏?

  •  
  •   fangwenxue · Mar 3, 2021 · 943 views
    This topic created in 1897 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   ·   5647 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 06:52 · PVG 14:52 · LAX 23:52 · JFK 02:52
    ♥ Do have faith in what you're doing.