We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Ngx-upload Code:
uploads: Observable<Uploader[]>; options: UploadxOptions = { endpoint: 'http://localhost:4000/uploads', chunkSize: 1024 * 1024 * 5, metadata: { foldername: 'hello', }, autoUpload: false, };
constructor(public uploadService: UploadxService) { this.uploads = this.uploadService.connect(this.options); }
pause(): void { this.uploadService.control({ action: 'pause' }); }
upload(): void { this.uploadService.control({ action: 'upload' }); }
node-uploadx Code
const storage = new S3Storage({ endpoint: '', bucket: '', region: 'ap-south-1', apiVersion: '2006-03-01', credentials: { accessKeyId: '', secretAccessKey: '', }, forcePathStyle: true, expiration: { maxAge: '1h', purgeInterval: '15min' }, onComplete: file => { console.log('File upload complete: ', file) return file }, filename: (file) => file.metadata.foldername + '/' + file.originalName });
app.use('/uploads', uploadx({ storage }), function (req, res) { var file = req.body; console.log('File upload complete: ', file.originalName); res.send(file) });
How to handle response when the file is uploaded. Also with the multi-file upload.
The text was updated successfully, but these errors were encountered:
for example add to constructor
this.uploads.subscribe(r => { const completed = r.filter(u => u.status === 'complete'); console.log(completed); // completed uploads array });
or
this.uploadService.events.subscribe(r => { if (r.status === 'complete') { console.log(r); // completed upload } });
Sorry, something went wrong.
Thanks @kukhariev It's working.
No branches or pull requests
Ngx-upload Code:
uploads: Observable<Uploader[]>;
options: UploadxOptions = {
endpoint: 'http://localhost:4000/uploads',
chunkSize: 1024 * 1024 * 5,
metadata: {
foldername: 'hello',
},
autoUpload: false,
};
constructor(public uploadService: UploadxService) {
this.uploads = this.uploadService.connect(this.options);
}
pause(): void {
this.uploadService.control({ action: 'pause' });
}
upload(): void {
this.uploadService.control({ action: 'upload' });
}
node-uploadx Code
const storage = new S3Storage({
endpoint: '',
bucket: '',
region: 'ap-south-1',
apiVersion: '2006-03-01',
credentials: {
accessKeyId: '',
secretAccessKey: '',
},
forcePathStyle: true,
expiration: { maxAge: '1h', purgeInterval: '15min' },
onComplete: file => {
console.log('File upload complete: ', file)
return file
},
filename: (file) => file.metadata.foldername + '/' + file.originalName
});
app.use('/uploads', uploadx({ storage }), function (req, res) {
var file = req.body;
console.log('File upload complete: ', file.originalName);
res.send(file)
});
How to handle response when the file is uploaded. Also with the multi-file upload.
The text was updated successfully, but these errors were encountered: