https://discord.cloudflare.com logo
Join Discord
Powered by
# stream
  • j

    joshh

    08/31/2022, 2:54 AM
    no
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:54 AM
    Oh
  • j

    joshh

    08/31/2022, 2:54 AM
    your solution is the solution I think
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:54 AM
    Yeah I'm definitely doing
    creator
    via the header but maybe I just didn't notice it wasn't working for me?
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:54 AM
    Or maybe your profileData.id is blank?
  • j

    joshh

    08/31/2022, 2:55 AM
    can you copy / paste ur fetch request here if you don't mind?
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:55 AM
    Sure
  • j

    joshh

    08/31/2022, 2:55 AM
    it's definitely not, but I can double check
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:55 AM
    Copy code
    ts
      const uploadLink = await fetch(`https://api.cloudflare.com/client/v4/accounts/${env.CFAccountID}/stream?direct_user=true`,
        {
          method: "POST",
          headers: {
            authorization: env.CFAPIToken,
            "upload-length": size.toString(),
            "tus-resumable": "1.0.0",
            "upload-metadata": `allowedOrigins ZGFzaGNoYXQuYXBwCg==,creator ${btoa(
              userID
            )}`,
            "Content-Type": "application/json",
          },
        }
      );
  • j

    joshh

    08/31/2022, 2:56 AM
    yeah mine's not blank
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:56 AM
    Hmmm
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:56 AM
    Interesting
  • j

    joshh

    08/31/2022, 2:56 AM
    hm your headers are in lower case
  • j

    joshh

    08/31/2022, 2:56 AM
    I may as well try that
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:57 AM
    Shouldn't matter since headers are case-insensitive, but feel free to try
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:57 AM
    Unfortunately, while I have access to upload a video it's currently sending to another person's Stream so I can't view whether the
    creator
    is actually being successfully applied on mine.
  • j

    joshh

    08/31/2022, 2:58 AM
    This is my ``upload-metadata`` header. ``creator Qk1PWUhCUURJUUhQWFdHWkRYSktSTERUTkVaUVNJT1BNUkdJQVlLQVdHWkRHTFJQVEZKRVRKRkdXUFVMTldaSlBZTFVNWlVIR09PRExSQlBHRkhRWFlHTEVWUE9TWUFXWUZITkhEQ01STFhJVlZSR01GSktGRklMUE5UTU9VUlBLVE9LSUtLTEZLT1JKTEJIT0lXRkFGV1pQS0VZV0dRSVRaTFdWQ0RLSERIT0pMRU9QU1hIRVJaUkVSVFlXSU1FSkpVTUNRVlhKWk5YUVJaVUdDR0lHTEhYU1VaSkVYQlFKVkFCTUFIV01OQ1VGWlJHTUhUWldPRURFS0xFQk5FU0NFU1hWR0tMVVdDWEJHVVdLWkxTVERVUFRaSk9TWFlDQ1FPTlBLSFhLRU9IRk5WTFZWRU1UTUNaSE9OU1dTVlJOWEFNTUFZS1lBV1BYTldQUFFMRkdTWFpPS1FBSlRKUUVaU1hUUlJIUlJNVlFRTFNRSFFVVlBESlNUWE5ZSEhTVlNVSVVRR0VPUEVLTFJSV1RLS0tSUVdOVFZIQ0JYUkFSRktYTEpHUUZLR1RIWlRHTVNLWFFFU1FTQg==,requiresignedurls``
  • j

    joshh

    08/31/2022, 2:58 AM
    bit of a mouthful to read honestly
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:58 AM
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 2:59 AM
    I'm heading to bed now, good luck with this! If you're still having trouble in the morning we can troubleshoot some more.
  • j

    joshh

    08/31/2022, 2:59 AM
    yeah no problem! Thanks for all your help!
  • j

    joshh

    08/31/2022, 3:00 AM
    ohhh
  • j

    joshh

    08/31/2022, 3:00 AM
    wait
  • j

    joshh

    08/31/2022, 3:00 AM
    Copy code
    You can apply the same constraints as Direct Creator Upload via basic upload when using tus. To do so, you must pass the expiry and maxDurationSeconds as part of the Upload-Metadata request header as part of the first request (made by the Worker in the example above.) The Upload-Metadata values are ignored from subsequent requests that do the actual file upload.
  • j

    joshh

    08/31/2022, 3:00 AM
    I don't think it's even meant for creator meta data
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 3:00 AM
    Oh?
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 3:00 AM
    Oh!
  • j

    joshh

    08/31/2022, 3:00 AM
    just maxduration and expiry
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 3:00 AM
    That would explain it haha
  • i

    Isaac McFadyen | YYZ01

    08/31/2022, 3:00 AM
    Anyways. Goodnight! đź‘‹
1...383940...105Latest