At the moment, I develop a little image-uploader for my nodejs-webapp. Every user has the right to upload 10 images(for example).
The upload should be performed on the client side to reduce the server workload.
For this reason, I generate a signed url on the server-side and send it to the client:
let request:S3.PutObjectRequest = {
Key:filename,
Bucket: "image-proxy",
Expires:new Date(20000),
ContentType:"jpg",ACL:"public-read"
}
this.s3.getSignedUrl("putObject",request,cb);
This works well, but how can I control the max of 10 Images and the general status of the upload? One possibility would be to send a callback from the client to the server, after the upload is completed.
But "never trust the client", what if a "hacker" block this callback.
Is it possible, to get a callback server-side from the "putObject", after the upload is finished?
Thanks.
Micheal had the solution:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.