@@ -115,6 +128,14 @@ export default function StreamPublishForm({ stream }: { stream?: string | string
>
{submitting ? 'Uploading...' : 'Upload'}
+ {progress > 0 && progress < 100 && (
+
+ )}
);
diff --git a/src/pages/api/[stream].ts b/src/pages/api/[stream].ts
index 04fad73..4251fb2 100644
--- a/src/pages/api/[stream].ts
+++ b/src/pages/api/[stream].ts
@@ -12,25 +12,4 @@ export default async function handler(
const data = prepareStreamItem(await getStream(stream as string));
res.status(200).json(data)
-
- // if(stream == 'nothing') {
- // res.status(200).json(null);
- // } else {
- // res.status(200).json(
- // {
- // title: "Stream: stream1",
- // description: "This is the description for stream: stream1",
- // feedUrl: "http://localhost:3000/api/stream1/feed",
- // siteUrl: "http://localhost:3000/stream1/podcasts",
- // imageUrl: "https://placehold.co/400",
- // author: "John Doe",
- // managingEditor: "Jane Doe",
- // webMaster: "John Smith",
- // language: "en",
- // categories: ["Technology", "Education", "Entertainment"],
- // pubDate: "2023-10-01",
- // ttl: 60,
- // }
- // );
- // }
}
\ No newline at end of file
diff --git a/src/pages/api/[stream]/podcasts.ts b/src/pages/api/[stream]/podcasts.ts
index 3cd3199..d88b996 100644
--- a/src/pages/api/[stream]/podcasts.ts
+++ b/src/pages/api/[stream]/podcasts.ts
@@ -74,6 +74,7 @@ const post = async (req: NextApiRequest, res: NextApiResponse) => {
await publishPodcast(podcastData);
+ res.setHeader('Location', `${process.env.NEXT_PUBLIC_API_BASE_URL}/api/${stream}/podcasts/${podcastData.podcastId}`);
res.status(201).json({ message: 'Podcast created successfully' });
} catch (error) {
console.error('Error handling request:', error);