带有预览的图像和非图像文件类型的文件上载

我在网上做了很多事情,并尝试找到问题的解决方案。 到目前为止,没有运气。 </ p>

我想在我的网站上创建一个文件上传器,它会为任何允许的文件类型生成用户上传文件的缩略图预览图像(它们一次只能上传一个)(如 jpg,gif,Word,pdf等)。 </ p>

我找到了这个: JQuery文件上载预览文件类型以允许所有文件类型,这表明我想要做的事情是不可能的,除非文件首先上传到服务器然后生成缩略图 文件。 我对此非常酷,但不知道从哪里开始构建它! </ p>

我正在寻找一种能与Bootstrap + PHP + AWS S3配合使用的解决方案,但可以灵活使用。 它可能是付费或免费的解决方案,但我宁愿不为它支付数百美元(甚至每月支付数十美元!)</ p>

任何人都可以指出我正确的方向 ? 我知道我应</ em>发布代码示例,但此时我没有发帖! 你可以告诉我,我对这个文件上传的东西比较新,所以如果你想跟我说话,就像我五岁那样可能会受到赞赏! lol </ p>
</ div>

展开原文

原文

I've done a lot of poking around on the net and SO to try to find a solution to my problem. So far, no luck.

I want a file uploader on my site that will generate thumbnail preview images of a user's uploaded file (they are restricted to uploading one at a time) for any of the allowable file types (like jpg, gif, Word, pdf, and more).

I did find this: JQuery File Upload preview File Type to allow all file types, which states that what I want to do is not possible unless the file is first uploaded to the server and then a thumbnail is generated for the file. I am totally cool with that, but don't know where to start in building that!

I am looking for a solution that will play nice with Bootstrap + PHP + AWS S3, but can be flexible. It could be a paid or free solution, but I'd rather not pay hundreds a month for it (or even tens of dollars a month!)

Can anyone point me in the right direction? I know I should be posting a code sample, but I don't have one to post at this point! As you can tell, I am rather new to this file upload thing, so you if you want to talk to me like I am five that might be appreciated! lol

douliao1911
douliao1911 哦,你是作者!我看错了。尼斯。所以上传后显示的图像是文件的预览?(右键单击查看图像会加载资源,所以我很好奇。)这可能是我需要的解决方案......
接近 5 年之前 回复
douqiong8412
douqiong8412 你显然比我更擅长Interneting,@guest271314!我会玩这个。
接近 5 年之前 回复
duanjing9739
duanjing9739 “Word”,“pdf”不是图像文件?请参阅stackoverflow.com/questions/28856729/...
接近 5 年之前 回复
dsi37923
dsi37923 如果你不关心IE9或更低版本应该有很多选项和插件
接近 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问