File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed
Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 5151 with :
5252 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
5353 accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
54- command : pages deploy ./build --project-name=howoldaremycats
54+ command : pages deploy . --project-name=howoldaremycats
5555 gitHubToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ export async function onRequestGet ( ctx ) {
2+ const path = new URL ( ctx . request . url ) . pathname . replace ( "/media/" , "" ) ;
3+ const file = await ctx . env . MEDIA . get ( path ) ;
4+ if ( ! file ) return new Response ( null , { status : 404 } ) ;
5+ return new Response ( file . body , {
6+ headers : { "Content-Type" : file . httpMetadata . contentType } ,
7+ } ) ;
8+ }
Original file line number Diff line number Diff line change 161161 "deathdate" : " " ,
162162 "images" : [
163163 " https://i.imgur.com/7Z5UHr3.jpg" ,
164- " https://pub-de0e381b0f7043a297494a2012c5777f.r2.dev /PixieHappyCountertop.mp4"
164+ " /media /PixieHappyCountertop.mp4"
165165 ],
166166 "imageAlt" : " Images of Pixie the cat" ,
167167 "sounds" : [
Original file line number Diff line number Diff line change 1+ pages_build_output_dir = " build"
2+
3+ [[r2_buckets ]]
4+ binding = " MEDIA"
5+ bucket_name = " howoldaremycats-videos"
You can’t perform that action at this time.
0 commit comments