File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/routes/(console)/project-[region]-[project]/sites Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 3
3
import { humanFileSize } from ' $lib/helpers/sizeConvertion' ;
4
4
import { formatTimeDetailed } from ' $lib/helpers/timeConversion' ;
5
5
import type { Models } from ' @appwrite.io/console' ;
6
+ import { page } from ' $app/state' ;
6
7
import {
7
8
Badge ,
8
9
Divider ,
45
46
}
46
47
47
48
function getFilePreview(fileId : string ) {
48
- return sdk .forConsole .storage .getFileView (' screenshots' , fileId );
49
+ // Project SDK with `console` project ID = Console SDK with region prefix
50
+ return sdk
51
+ .forProject (page .params .region , ' console' )
52
+ .storage .getFileView (' screenshots' , fileId );
49
53
}
50
54
</script >
51
55
Original file line number Diff line number Diff line change 33
33
}
34
34
35
35
function getFilePreview(fileId : string ) {
36
- return sdk .forConsole .storage .getFileView (' screenshots' , fileId );
36
+ // Project SDK with `console` project ID = Console SDK with region prefix
37
+ return sdk
38
+ .forProject (page .params .region , ' console' )
39
+ .storage .getFileView (' screenshots' , fileId );
37
40
}
38
41
</script >
39
42
You can’t perform that action at this time.
0 commit comments