|
|
@ -122,6 +122,10 @@ function save(partID) {
|
|
|
|
var data = new FormData();
|
|
|
|
var data = new FormData();
|
|
|
|
|
|
|
|
|
|
|
|
if (datasheet.length == 1)
|
|
|
|
if (datasheet.length == 1)
|
|
|
|
|
|
|
|
if(! datasheet[0]['name'].match(/^[\w\-]+\.pdf$/g)) {
|
|
|
|
|
|
|
|
alert('Invalid filename. Please match /^[\w\-]+\.pdf$/g');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
data.append('datasheet-file', datasheet[0]);
|
|
|
|
data.append('datasheet-file', datasheet[0]);
|
|
|
|
data.append('block', block_v);
|
|
|
|
data.append('block', block_v);
|
|
|
|
data.append('type', type_v);
|
|
|
|
data.append('type', type_v);
|
|
|
|