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 {
159
159
translator : this . _trans
160
160
} ) ;
161
161
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 ) ;
165
166
} ) ;
166
167
167
168
const key = `${ options . format } :${ options . contentType } :${ options . path } ` ;
You can’t perform that action at this time.
0 commit comments