Good Day
Im a complete beginner with development and something i am teaching my self.
I am playing around with AWS Translate.
Using the AWS javascript SDK within browser.(ie loading the sdk.js).
AWS Translate allows you to upload CSV files containing, custom terminology for the translation.
It requires that you pass the CSV as a blob.
Using javascript or jquery, how do i create an upload of the csv input that adds to a blob?
function UploadTerm() {
var blobvar = // how do i get a file csv as a blob?
var params = {
MergeStrategy: 'OVERWRITE',
Name: 'test',
TerminologyData: {
File: blobvar,
Format: 'CSV'
},
Description: 'this is a test',
};
translate.importTerminology(params, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
});
}
Thank you.
Im a complete beginner with development and something i am teaching my self.
I am playing around with AWS Translate.
Using the AWS javascript SDK within browser.(ie loading the sdk.js).
AWS Translate allows you to upload CSV files containing, custom terminology for the translation.
It requires that you pass the CSV as a blob.
Using javascript or jquery, how do i create an upload of the csv input that adds to a blob?
function UploadTerm() {
var blobvar = // how do i get a file csv as a blob?
var params = {
MergeStrategy: 'OVERWRITE',
Name: 'test',
TerminologyData: {
File: blobvar,
Format: 'CSV'
},
Description: 'this is a test',
};
translate.importTerminology(params, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
});
}
Thank you.
Last edited: