Package Exports
- bas-concept-file-upload-webclient
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bas-concept-file-upload-webclient) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bas-concept-file-upload-webclient
Prova de conceito para API de upload de arquivos para BAS (WebClient)
Adicionando a biblioteca em sua aplicação
<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- ... -->
</head>
<body>
<div>
<!-- ... -->
</div>
<script src="https://unpkg.com/bas-concept-file-upload-webclient/dist/bas-concept-file-upload-web-client.js"></script>
</body>
</html>Enviando arquivos
var webClient = new BasConceptFileUploadWebClient();
var files = /* ... */
var params = /* ... */
webClient.sendFile(files, params)
.then(function (result) {
console.log('Success:', result);
})
.catch(function (result) {
console.log('Error:', result);
});Servidor
A parte do lado do servidor dessa prova de conceito pode ser encontrada em https://github.com/erlimar/bas-concept-file-upload-api
Demonstração
Você pode ver uma demonstração online em https://unpkg.com/bas-concept-file-upload-webclient/index.html