Skip to content

Commit

Permalink
将视频添加至相册
Browse files Browse the repository at this point in the history
  • Loading branch information
perrornet committed Feb 10, 2019
1 parent b0d486e commit ba9cb28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions project/pages/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class HomeScreen extends React.Component {
try {
const ret = RNFS.downloadFile(options);
ret.promise.then(resp => {
CameraRoll.saveToCameraRoll(`file://${downloadDest}`, "video").catch(err =>{console.warn(err)});
this.refs.toast.show(`[${fileName}]已保存至相册`, 2000)
}).catch(err => {
if (err.toString().match("such file") != null){
Expand Down

0 comments on commit ba9cb28

Please sign in to comment.