File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1087,8 +1087,8 @@ public function mediaUpload(Request $request)
1087
1087
1088
1088
$ resource = new Fractal \Resource \Item ($ media , new MediaTransformer ());
1089
1089
$ res = $ this ->fractal ->createData ($ resource )->toArray ();
1090
- $ res ['preview_url ' ] = url (' /storage/no-preview.png ' );
1091
- $ res ['url ' ] = url (' /storage/no-preview.png ' );
1090
+ $ res ['preview_url ' ] = $ media -> url (). ' ?cb=1&_v= ' . time ( );
1091
+ $ res ['url ' ] = $ media -> url (). ' ?cb=1&_v= ' . time ( );
1092
1092
return response ()->json ($ res );
1093
1093
}
1094
1094
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ public function transform(Media $media)
12
12
return [
13
13
'id ' => (string ) $ media ->id ,
14
14
'type ' => $ media ->activityVerb (),
15
- 'url ' => $ media ->url (),
15
+ 'url ' => $ media ->url () . ' ?cb=1&_v= ' . time () ,
16
16
'remote_url ' => null ,
17
- 'preview_url ' => $ media ->thumbnailUrl (),
17
+ 'preview_url ' => $ media ->thumbnailUrl () . ' ?cb=1&_v= ' . time () ,
18
18
'text_url ' => null ,
19
19
'meta ' => null ,
20
20
'description ' => $ media ->caption ,
@@ -24,6 +24,7 @@ public function transform(Media $media)
24
24
'filter_name ' => $ media ->filter_name ,
25
25
'filter_class ' => $ media ->version == 1 ? $ media ->filter_class : null ,
26
26
'mime ' => $ media ->mime ,
27
+ 'blurhash ' => $ media ->blurhash
27
28
];
28
29
}
29
30
}
You can’t perform that action at this time.
0 commit comments