dongshanji3102 2015-06-05 10:43
浏览 47

使用s3 php sdk在亚马逊中添加zip文件

Can we add some files(append) inside zip file which is already uploaded into amazon s3 ? using php sdk?

  $result = $s3->uploadPart(array(
                                    'Bucket'     => $as3_bucket,
                                    'Key'        => $as3_file,
                                    'UploadId'   => $uploadId,
                                    'PartNumber' => $partNumber,
                                    'Body'       => fread($file, 5 * 1024 * 1024),
                                ));

This is from client side. What I'm trying is that after uploaded 5 MB 'Body' => fread($file, 5 * 1024 * 1024) I cut the call then again open the file uploading from another 5MB. like this I'm uploading data. problem is the last only 5Mb of data gets stored in that file(after finished connection i checked the file size in s3 ). I'm reading 5MB from the file according to the how many times called .

so no problems in fread , problem is in multipart upload ,I cannot continue uploading where I stopped. Whenever I tried for next call , the fresh zip created even i'm using same upload ID , but in Amazon s3.php file we have 'seekTo' option , to append files ! like this amazon s3 sdk php also having any function like this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Pwm双极模式H桥驱动控制电机
    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题