CaiqueNds commented on issue #286:
URL:
https://github.com/apache/cordova-plugin-media-capture/issues/286#issuecomment-1773329967
This is where the error occurs and I capture the video from media capture
and pass it to the plugin file:
````
async criaEstruturaDiretoriosCopiaArquivo(
new_path: string,
path_file: string,
file_name: string,
gerar_nome_random: boolean = true
): Promise<string> {
let new_path_file = '';
//This is where I set the path where the file will be saved
await this.criaCaminhoDiretorio(new_path).then((x) => {
new_path_file = x;
});
const new_file_name = !gerar_nome_random
? file_name
: (Math.floor(Math.random() * (10000 - 1 + 1)) + 1).toString() +
"." +
file_name.slice(file_name.lastIndexOf(".") + 1); // Move o arquivo
return this.file
.copyFile(path_file, file_name, new_path_file, new_file_name)
.then(() => {
return new_path + "/" + new_file_name;
})
.catch((err) => {
console.error(err);
return "";
});
}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]