File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
frontend/src/app/api/screenshot Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ export async function GET(req: Request) {
39
39
40
40
// Set viewport to a reasonable size
41
41
await page . setViewport ( {
42
- width : 1280 ,
43
- height : 720 ,
42
+ width : 1920 ,
43
+ height : 1080 ,
44
44
} ) ;
45
45
46
46
// Navigate to URL with increased timeout and more reliable wait condition
@@ -49,10 +49,12 @@ export async function GET(req: Request) {
49
49
timeout : 60000 , // Increased timeout to 60 seconds
50
50
} ) ;
51
51
52
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ; // Waits for 1 seconds
53
+
52
54
// Take screenshot
53
55
const screenshot = await page . screenshot ( {
54
56
type : 'png' ,
55
- fullPage : false ,
57
+ fullPage : true ,
56
58
} ) ;
57
59
58
60
// Always close the page when done
You can’t perform that action at this time.
0 commit comments