File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/my-shared-docprovider/src Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,10 @@ export class MySharedDrive extends Drive implements ICollaborativeDrive {
159159 translator : this . _trans
160160 } ) ;
161161
162- this . _app . serviceManager . contents . get ( options . path , { content : true , format : 'text' } ) . then ( model => {
163- console . log ( 'set model source to:' , model . content ) ;
164- provider . setSource ( model . content ) ;
162+ this . _app . serviceManager . contents . get ( options . path , { content : true } ) . then ( model => {
163+ console . log ( 'set model source:' , model ) ;
164+ const content = model . format === 'base64' ? atob ( model . content ) : model . content ;
165+ provider . setSource ( content ) ;
165166 } ) ;
166167
167168 const key = `${ options . format } :${ options . contentType } :${ options . path } ` ;
You can’t perform that action at this time.
0 commit comments