Flash file upload vs php file upload - which one t

2019-03-02 07:02发布

I was trying to upload a photo on facebook using a browser with no flash, and could see that it didn't work.

I am pretty confident in handling files and related issues using Php and have done some sites allowing users to upload and manage files (images, docs etc). But I never thought about the above flash approach. I googled a bit and saw that there are few scripts available on which I can look how it works using flash.

But my questions are, when I should decide to use flash for user uploads. What are the advantages of using this approach? or disadvantages?

Thanks

4条回答
Lonely孤独者°
2楼-- · 2019-03-02 07:09

Well, with flash, the obvious letdown is that it will only work when a user has flash (although, you could display something in its place if they didn't). If your a flash programmer and comfortable with flash, I can see how it would be better. You could generate a file list, multiple uploads ect. I would say it's just an alternative to JavaScript for providing interactivity and allowing users to upload content dynamically.

查看更多
孤傲高冷的网名
3楼-- · 2019-03-02 07:20

It isn't a choice between Flash and PHP. You need something on the client to send the data and something on the server to receive it.

Ask yourself the following question:

Does Flash offer anything useful for my project?

The obvious things it lets you do are having a nice UI for selecting multiple files at once, and a simple method for seeing the progress of uploads.

If you decide that it does offer features, then implement it using progressive enhancement. Flickr is an example of this — with Flash you get the fancy uploader, without it you still get a series of regular file inputs. They aren't as nice to use, but they are functional and what would have been used if Flash wasn't an option in the first place

查看更多
神经病院院长
4楼-- · 2019-03-02 07:21

Depends on your audience: If you are pretty sure that your users have flash installed, there is nothing against it. It even gives some neat advantages, like:

  • Upload of multiple files at once
  • Progress bar while uploading
  • Instant preview of uploaded media
  • etc.
查看更多
对你真心纯属浪费
5楼-- · 2019-03-02 07:26

when I should decide to use flash for user uploads.

use it when the whole website is flash, but that is not professional and you can't count a lot on flash security, while you can write/use a lot of classes for hardening and checking files uploaded by php scripts..

on the other hand, some people like flash upload for progress bars, but you can do such stuff with php and jquery. for example check uplodify

Correction

I don't have flash support on my current browser so when watching uploadify demos I only see the fallback, thanks to soulmerge for making this clear

查看更多
登录 后发表回答