V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
fangwenxue
V2EX  ›  问与答

cf worker 上传文件损坏?

  •  
  •   fangwenxue · 2021-03-03 17:47:56 +08:00 · 444 次点击
    这是一个创建于 1121 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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
    })
    
    • 对比了源文件跟上传的文件
    • 这是乱码了?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1013 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:30 · PVG 03:30 · LAX 12:30 · JFK 15:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.