File tree Expand file tree Collapse file tree 2 files changed +7881
-7944
lines changed Expand file tree Collapse file tree 2 files changed +7881
-7944
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,9 @@ await Model.$find(1)
365365They handle and unwrap responses within "data".</alert >
366366
367367## ` file `
368+
369+ <alert type =" success " >Available in version >= v1.15.0</alert >
370+
368371- Returns: ` Binary `
369372
370373Execute the query with $http.responseType as ` blob ` and returns a binary
@@ -374,10 +377,10 @@ Execute the query with $http.responseType as `blob` and returns a binary
374377const data = await Model .file ()
375378
376379// force file download
377- const url = window .URL .createObjectURL (new Blob ([data]));
378- const link = document .createElement (' a' );
379- link .href = url;
380- link .setAttribute (' download' , ' model.xlsx' ); // or any other extension
381- document .body .appendChild (link);
382- link .click ();
383- ```
380+ const url = window .URL .createObjectURL (new Blob ([data]))
381+ const link = document .createElement (' a' )
382+ link .href = url
383+ link .setAttribute (' download' , ' model.xlsx' ) // or any other extension
384+ document .body .appendChild (link)
385+ link .click ()
386+ ```
You can’t perform that action at this time.
0 commit comments