fangwenxue
V2EX  ›  问与答

cf worker 上传文件损坏?

  •  
  •   fangwenxue · Mar 3, 2021 · 960 views
    This topic created in 1905 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   ·   3718 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:40 · PVG 12:40 · LAX 21:40 · JFK 00:40
    ♥ Do have faith in what you're doing.