PHP上传“通过传递”到Amazon的S3? [英] 'pass through' php upload to amazon's s3?

查看:193
本文介绍了PHP上传“通过传递”到Amazon的S3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过的方式上传文件直接S3和我所见过的方式已经上传的文件在服务器上。我需要把它发送到S3之前修改文件名,但我不希望存储在本地,然后上传,如果我能帮助它。有没有办法把它放在一个缓冲区或东西吗? THX。

I've seen ways to upload files directly to S3 and I've seen ways to upload a file already on the server. I need to modify the file's name before sending it on to S3, but I don't want to store it locally and then upload it, if I can help it. Is there a way to put it in a buffer or something? Thx.

推荐答案

该文件将永远结束​​了在临时目录第一,而上载完成,你能够与上传的文件工作之前。你得到的所有文件的数据块之前,然后获得在默认情况下,/ tmp目录重建。因此,没有,没有直通​​。但是,我想你可以直接从临时目录重新上传它移动到另一个工作目录之后,而不是。

The file will always end up in the temporary directory first while the upload completes, even before you're able to work with the uploaded file. You get all the file's chunks before, and then it get rebuilt in the /tmp directory by default. So no, there's no "pass-through". But I guess you could re-upload directly from the temporary directory afterwards instead of moving it to another working directory.

这篇关于PHP上传“通过传递”到Amazon的S3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆