简体   繁体   中英

blueimp/jQuery-File-Upload direct upload to S3

I'm trying to implement blueimp jquery uploader. I want it to upload directly to S3 (without PHP script in the middle). I found an example here and followed the steps and it worked (partially). But I could not find anything good for muti-file upload.

What I want to do is to have multiple file uploader with a UI feedback just like in this example .

Does anybody have an example to follow for this scenario?

Thanks for your help.

I couldn't get blueimp to perfectly upload to s3, it would still take advantage of my servers tmp folder.

I ended up switching over to plupload which does upload directly to s3, and has a built in UI ( I just created my own to match the rest of my site).

I'm not using the multiple file feature but you could do something like

foreach file you are uploading:

var multipart_params = {
            'key': config['key'],
            'Filename': config['key'],
            'acl': 'public-read',
            'Content-Type': '',
            'AWSAccessKeyId': config['awskey'],
            'policy': config['policy'],
            'signature': config['signature']
        };


up.settings.multipart_params = multipart_params;
up.start();

Hope that helps :)

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM