Skip to content

Commit de83ff7

Browse files
committed
special handling for GIF
1 parent fe83de5 commit de83ff7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/pico-engine/src/setupServer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ module.exports = function(pe){
102102
if(err) return errResp(res, err);
103103
if(_.isFunction(data)){
104104
data(res);
105+
}else if(respType && funcPart[1] === "gif"){
106+
res.header("Content-Type", respType);
107+
res.write(Buffer.from(Uint8Array.from(data)),"binary");
108+
res.end();
105109
}else if(respType && funcPart[1] !== "json"){
106110
res.header("Content-Type", respType);
107111
res.end(data);

0 commit comments

Comments
 (0)