Skip to content

base64 #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
W-prog opened this issue Mar 24, 2017 · 3 comments
Closed

base64 #737

W-prog opened this issue Mar 24, 2017 · 3 comments

Comments

@W-prog
Copy link

W-prog commented Mar 24, 2017

Hi,
Anyone have an example for upload items with base64 encoding
Actually I use https://github.com/adonespitogo/angular-base64-upload who work great but I want use angular-file-upload for multiple files upload and bootstrap integration
Thanks
Regards

@nervgh
Copy link
Owner

nervgh commented Mar 27, 2017

Good day,

Check out these issues: #249, #208.

@W-prog
Copy link
Author

W-prog commented Mar 27, 2017

Oh thank you. Isn't the same prob but I have found with this issues.
I post my tips

uploader.onAfterAddingFile = function(item) { var reader = new FileReader(); reader.onload = function(event) { $scope.$apply(function() { item.image = event.target.result; var monImage =item.image; // Marche avec autre chose que image bien sur. PDF testé // Suppression du début de chaine inutile var index = monImage.indexOf(","); if (index >= 0) { myEntity.ContenuFichierAEnregistrer = monImage.substring(index + 1); } var monNom = item.file.name; myEntity.NomFichier = monNom; // console.log(myEntity); // Ready to checkin }); }; reader.readAsDataURL(item._file); };
Regards

@W-prog
Copy link
Author

W-prog commented Mar 27, 2017

Sorry, my code don't format correctly...
This is important
var monImage =item.image;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants