From 8ddb28d3c54b63fb81ca361e741e5a6a46c1d25f Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Tue, 30 Jul 2024 08:25:31 -0700
Subject: [Video] Uploads (#4754)

* state for video uploads

* get upload working

* add a debug log

* add post progress

* progress

* fetch data

* add some progress info, web uploads

* post on finished uploading (wip)

* add a note

* add some todos

* clear video

* merge some stuff

* convert to `createUploadTask`

* patch expo modules core

* working native upload progress

* platform fork

* upload progress for web

* cleanup

* cleanup

* more tweaks

* simplify

* fix type errors

---------

Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
---
 src/state/shell/post-progress.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 src/state/shell/post-progress.tsx

(limited to 'src/state/shell/post-progress.tsx')

diff --git a/src/state/shell/post-progress.tsx b/src/state/shell/post-progress.tsx
new file mode 100644
index 000000000..0df2a6be4
--- /dev/null
+++ b/src/state/shell/post-progress.tsx
@@ -0,0 +1,18 @@
+import React from 'react'
+
+interface PostProgressState {
+  progress: number
+  status: 'pending' | 'success' | 'error' | 'idle'
+  error?: string
+}
+
+const PostProgressContext = React.createContext<PostProgressState>({
+  progress: 0,
+  status: 'idle',
+})
+
+export function Provider() {}
+
+export function usePostProgress() {
+  return React.useContext(PostProgressContext)
+}
-- 
cgit 1.4.1

