rejetto forum

Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: TSG on July 22, 2009, 07:08:12 AM

Title: Flash Uploader
Post by: TSG on July 22, 2009, 07:08:12 AM
I am looking into Flash Uploader solutions tonight, whilst working on the new preview box styling. If anyone has any free and open source flash uploaders that they want me to look at, post here.

This is the first one I am looking at:
http://swfupload.org/

We came to the solution that Richard and I have no idea where to start with a flash uploader. So for the first time ever we might have to use an external source until we get our heads around the code. As soon as we get this working properly, The dodgy [progress] (transfers) and [uploads] sections will disappear from all of our templates, being replaced with this all in one solution. This will remove alot of JavaScript, CSS, so we shouldn't have to worry about the filesize of the flash object, unless its ridiculous. This will hopefully be a more reliable solution for all involved. Sure it requires users to have Flash, but then so does our mp3 player, youtube and just about every other popular site on the internet.
Title: Re: Flash Uploader
Post by: Sapphirescales on July 22, 2009, 07:13:09 AM
I haven't been able to find any sort of uploader so far that doesn't require PHP or another type of scripting that HFS simply doesn't have.

I remember looking at swfupload before and I abandoned it for some reason.  I think it was because it required MySQL or something.  But don't give up hope.  I might be mistaken.

And I'm glad that rawr-designs is looking at external sources for some of it's features.  Instead of looking at using external sources as a "missed" opportunity to learn something, think of it as an opportunity not only to learn something but to IMPROVE upon the best feature you've been able to find online.  Now you can temporarily use this external flash uploader while studying the technology and eventually improving upon it.  I personally can't think of anything better. :)

Although I admire your sense of duty with trying to keep everything 100% only done by you, what you're doing isn't very realistic.  You've done a great job, but insisting on this exclusively "your own" code thing is holding you guys back.  It's like when you want to write a program like Photoshop.  The task alone is enormous, but then you say that you're going to create a new programming language to write it in too.  While you may be able to make a new (and improved) programming langauge, looking back at the old language and seeing what has been done will help you in your task.  Looking at Photoshop's code will help you too.  If you don't learn from the experiences of others you'll never grow.  The world isn't as simple as it was before.  Everything is a group and community project nowadays.  And now it's even spanning generations.  We have to start thinking differently if we want to keep this exponential growth in progress going.
Title: Re: Flash Uploader
Post by: TSG on July 22, 2009, 07:27:12 AM
Well if rejetto can provide the macro and resources needed, then there is no reason it shouldn't work... I remember an old topic in another board about this. The conclusion was that no one knew how to make one themselves, but rejetto seemed to understand how it worked.... I need more programming minded people in here, where are they when you need them :P
Title: Re: Flash Uploader
Post by: Sapphirescales on July 22, 2009, 07:53:09 AM
There are tons of flash uploaders up there.  If HFS could just make use of PHP we'd be all set. :-\  So what would this flash uploader need to be programmed in?  Just javascript and maybe some macros or something?  I dont' see that happening.
Title: Re: Flash Uploader
Post by: TSG on July 22, 2009, 08:27:01 AM
If we can get one that works with just flash and javascript then it should work with HFS. SWF Upload was recommended by rejetto in an earlier thread but I want to talk with him about whether or not he has tried to implement it.
Title: Re: Flash Uploader
Post by: rejetto on July 22, 2009, 09:21:46 AM
few months ago i was working on getting the flash uploader in the default HFS template.
i got swfuplolad to work with HFS with its html demo, so it's definitely possible. no php is required, or anything.
i was just not finished with integrating it in the template.
Title: Re: Flash Uploader
Post by: TSG on July 22, 2009, 09:40:09 AM
Can you show me that example over MSN? I would really like to scrap the shitty transfers and upload pages in our templates as soon as possible.
Title: Re: Flash Uploader
Post by: rejetto on July 22, 2009, 10:07:09 AM
i was about to post it somehow at my prev reply, but i lost it.
anyway, it was very simple, and i made it again in 2 minutes.
what i did is
1. unzip the provided demos archive
2. share the demos folder in HFS
3. create the upload folder (i shared an /upload folder, in the root, permissions anyone)
4. open simpledemo/index.php
5. change this line accordingly
            upload_url: "/upload",
6. remove this line
            post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
7. save as index.html
8. open /simpledemo/index.html in the browser, and upload your files. it works to me.
Title: Re: Flash Uploader
Post by: TSG on July 22, 2009, 10:15:27 AM
Its not working for me, it sits at 'uploading...' and on HFS it says 'requesting'.

EDIT: Ok I got it to work, but only with upload enabled to anyone... how can we change that so its working for accounts.

EDIT:

Integrated it with the [upload] section of HFS, and ended up with this error when the folder is protected, it works fine when when upload is enabled for everyone...

8:40:41 PM 127.0.0.1:52175 Upload failed, Not allowed: file.ext
Title: Re: Flash Uploader
Post by: Sapphirescales on July 22, 2009, 12:50:19 PM
Maybe you shouldn't be using the demo but trying to integrate it via the instructions instead?

I don't see how it could work though.  It includes PHP, which isn't compatible with HFS. :'(  Renaming it to .html isn't going to help matters I don't think.  If it could work with just an HTML file, don't you think they would have done that?  It's much easier to code using HTML/Javascript than PHP.
Title: Re: Flash Uploader
Post by: Foggy on July 22, 2009, 01:15:06 PM
after a quick Google I found a couple links which could be quite useful. I may install flash and have a quick test with it as I do believe this could be quite simple to create a proof of concept.

http://markshu.ca/imm/flash/tutorial/fileReference.html
http://www.ultrashock.com/forums/flash-professional/tutorial-flash-uploading-73938.html
http://www.flash-db.com/Tutorials/upload/upFiles.php?

The last link seems particularly useful, although they are all quite similar.

edit: For authentication on protected folders this link will be useful as its a different method. http://stackoverflow.com/questions/509219/flex-3-how-to-support-http-authentication-urlrequest
Title: Re: Flash Uploader
Post by: TSG on July 22, 2009, 02:37:42 PM
It will work Sapphire, it is working, however there is some sort of authentication error happening, the flash uploader apparently creates its own connection seperate to the html page where the form would be. So HFS returns the value 'Not Allowed' maybe rejetto needs to make something for this to work properly on protected folders...
Title: Re: Flash Uploader
Post by: Sapphirescales on July 22, 2009, 09:23:06 PM
Well I really do hope this works.  A flash uploader is pretty much essential so if one can be implemented it should be.
Title: Re: Flash Uploader
Post by: mysoogal on July 22, 2009, 11:40:20 PM
i use uploadify small and pretty nice looking

http://www.uploadify.com/demo/

but hfs not yet supporting php  :o
Title: Re: Flash Uploader
Post by: TSG on July 23, 2009, 05:07:41 AM
We'll use something open source so we can get used to the code, hopefully coming up with our own tightened up solution later on.

It doesn't need PHP it just needs to somehow get around this not allowed error and it'll work...
Title: Re: Flash Uploader
Post by: rejetto on July 23, 2009, 01:44:37 PM
this is from swfupload documentation
Quote
HTTP Authentication is not well supported by the Flash Player. Later versions of Flash Player behave better. Old version of Flash Player would crash the browser.

sad story.
this wouldn't be a big problem with cookie-based authentication :P
Title: Re: Flash Uploader
Post by: Sapphirescales on July 23, 2009, 07:59:38 PM
By flash player?  Wouldn't that mean that ANY flash based uploader would be plagued by this problem? :'(

If that's so is there any way to change the method of authentication? 
Title: Re: Flash Uploader
Post by: mysoogal on July 24, 2009, 06:03:53 AM
I'm wondering if you can use python to upload files  ;D
Title: Re: Flash Uploader
Post by: TSG on July 26, 2009, 01:44:06 PM
I have tried other flash uploaders, its up to your genius now rejetto :) there must be something we can do to allow a flash uploader to work with protected folders and http authentication. Some way to emulate the situation, but its over my head.
Title: Re: Flash Uploader
Post by: TSG on August 30, 2009, 09:21:35 AM
Hey rejetto, I know you haven't been around much. However it has been just over a month now. Wondering how much closer this is to something tangible... I think it is a necessary upgrade to HFS... from my investigation I can't find any better way to do this other using flash in some shape or form. Or Java. And both create their own upload connection to the server... so something is needed to catch those requests and let them do their thing.
Title: Re: Flash Uploader
Post by: rejetto on August 30, 2009, 01:24:01 PM
if i got it right, permissions/authentication is our problem... right?

if we don't find/build a flash applet that will correctly use http authentication, then there's no way i know it could work,
except
1. trying to workaround http authentication by submitting user/pass as POST data. this would only work with HFS, as it's not standard, but it may be ok.
2. supporting cookie-based authentication on HFS, that will take a while.
Title: Re: Flash Uploader
Post by: TSG on August 30, 2009, 03:08:34 PM
Yes, it works not a problem when we have anonymous access, but add a password and the lights flash red on all panels. I don't know much about that server side stuff so I have to leave it up to you and the other HFS delphi programmers.
Title: Re: Flash Uploader
Post by: rejetto on August 30, 2009, 03:14:31 PM
what are these lights exactly?
Title: Re: Flash Uploader
Post by: TSG on August 30, 2009, 03:16:38 PM
HFS says 'NOT ALLOWED' in the log, and the flash uploader (SWF Upload) basically fails. It says an error randomly about authentication, which is what lead me to this conclusion.
Title: Re: Flash Uploader
Post by: rejetto on August 30, 2009, 03:19:14 PM
mmm, and are you able to pass user/pass as POST data?
Title: Re: Flash Uploader
Post by: TSG on August 30, 2009, 03:20:43 PM
I have not tried, Flynsarmy seems to think he has found a Flash uploader that uses Flash to get the multiple file uploads, but then uses Javascript to do the uploading. Which might work. But it might just be how SWF Upload works. I never really looked into it that deep.
Title: Re: Flash Uploader
Post by: rejetto on August 30, 2009, 03:26:32 PM
I have not tried,

would that be possible, i could make HFS to accept the login through it
Title: Re: Flash Uploader
Post by: TSG on August 30, 2009, 03:29:52 PM
Flynsarmy just told me he might be wrong, flash might be the one doing the uploading. Also I have no idea, it is possible that it might work if we append the login details to the url, however how secure is that?
Title: Re: Flash Uploader
Post by: rejetto on August 30, 2009, 05:25:17 PM
Flynsarmy just told me he might be wrong, flash might be the one doing the uploading.

yes it's possible.
but flash as well may send additional data.

Quote
Also I have no idea, it is possible that it might work if we append the login details to the url, however how secure is that?

don't worry, it's not shown in the address bar of the browser.
Title: Re: Flash Uploader
Post by: Sapphirescales on August 31, 2009, 08:05:53 AM
Here's to hoping you guys can get it to work. ;D I'm eagerly awaiting some sort of flash uploader. 8)
Title: Re: Flash Uploader
Post by: Foggy on August 31, 2009, 08:25:23 AM
mmm, and are you able to pass user/pass as POST data?

I do believe that sending the user/pass as post data is possible, you can craft your own POST requests in flash.

Though I am unsure if you can add the user/pass as a POST variable when uploading a file via flash. I would think you can though.

Check out the "fileReference" class in flash to see how the uploading will work.
Title: Re: Flash Uploader
Post by: rejetto on August 31, 2009, 10:58:08 AM
it's technically possible.
i was just wondering if the lib/tool you use to do the upload was designed to let you do it.
swfupload does as far as i can recall.
Title: Re: Flash Uploader
Post by: Flynsarmy on September 02, 2009, 04:29:17 AM
I've been reading through this thread and have come up with a couple of ideas.

Firstly: How would you get the user/password TO flash without having it visible in the code? When you log in,
you enter your username and password into the form and hit submit - HFS logs you in. But then how would your
flash applet receive these login details without you either entering them again into the flash applet or visibly
sending the info to the applet in the code as it is loaded? That wouldnt' be a MAJOR security risk because you
already know your own user/password but it's still pretty dodgy in my opinion...

Anyway the idea I came up with that's kind of a compromise is to have a flash applet that does nothing more than
pop up a browse box. Our main problem (besides not having some fancy progress bars on upload) is that we can't
select multiple files at once. So i'm wondering if its possible to activate the applet as you click a browse button
which then pops up a browse box. You select your files and hit ok and flash then uses its externalinterface call or
whatever it is to send the file info back to javascript which in turn dynamically creates its file input boxes and
submits them with AJAX or whatever you want to do with them.

This would give the appearance of a complete HTML solution which allows multiple files to be selected instead of
just the one.
Title: Re: Flash Uploader
Post by: TSG on September 06, 2009, 05:45:51 PM
I like your solution and it might actually be very possible, however the word 'compromise' is very true there. I believe flash handles uploading better than a browser, and real upload progress would be really nice. Maybe with an ahah/ajax solution (how does gmail do its dynamic progress?) we can get real progress but I would prefer just to use a nice flash applet for a simple uploading solution that anyone can implement. It really is a shame that its not that simple.
Title: Re: Flash Uploader
Post by: rejetto on September 24, 2009, 08:36:37 AM
sorry for the late reply

Firstly: How would you get the user/password TO flash without having it visible in the code?

no way with current system.

Quote
Anyway the idea I came up with that's kind of a compromise is to have a flash applet that does nothing more than
pop up a browse box.

that's what swfupload does. the rest is html+js.
Title: Re: Flash Uploader
Post by: rejetto on September 24, 2009, 08:41:34 AM
Maybe with an ahah/ajax solution (how does gmail do its dynamic progress?)

i had a quick look, and i can tell you that the bar is not flash, tho gmail requires flash for that (they say it in the settings page)
Title: Re: Flash Uploader
Post by: nuvolablu on November 14, 2009, 02:51:31 PM
hi guys,
   I think this is the major urgent feature requested!!
Please work on it...
I hope to see it working soon.
Best regards.
S.
Title: Re: Flash Uploader
Post by: nuvolablu on December 03, 2009, 06:03:43 PM
UP
Title: Re: Flash Uploader
Post by: TSG on December 07, 2009, 03:53:02 AM
All of us agree nuvolablu, but until someone figures out how to get Flash's connection to work with HFS on a protected folder, it will not be possible.

This is the major thing holding up our template updates, we intended this to be the next big update to top off 2009, but obviously not. It has worked out ok cause we are both very busy, but all the same, we want this feature too.
Title: Re: Flash Uploader
Post by: teslaman on December 22, 2010, 10:27:31 AM
(Revives thread) First off, thanks rejetto and TSG for sharing the swfupload info/how-to. Since I don't use a protected upload folder it has being working great for me! :)

Now for the bummer. Since one of the more recent Flash 10 updates, the uploader always comes back with a Http 301 error for me and everyone else that has tried...across multiple browsers. :'( This happened in early August, so v10.1.53.64 should have been the last Flash release that didn't give the 301 error. The upload still finishes fine, but I ended up disabling the "re-queue on error" feature since it would just keep looping the upload.

I had thought this was strictly a swfupload problem since their latest version pre-dates the Flash 10 update, but now I'm not sure. I decided to try past betas and the latest stable of HFS. After trying over 20 builds I found that the latest stable and the betas up to build #171 all give a successful upload message...after about 2 minutes of waiting past 100% file upload that is. It used to be instant, but I was testing on localhost this time and before, doing it that way just crashed my connection. :o Perhaps the latest Flash version has slowed it down?....who knows, haha. Sadly, all the beta builds that I tried after #171 give me the 301 error in the Flash uploader. :(

Having found that out, I thought I would mention it in case there is possibly a yet unseen bug in HFS that would cause this error with flash based uploading in the future? If you want to check it out, I've attached my customized code of the swfuploader. I've also tried the original code in case I had messed something up, but it still gave the 301 error. :(

Just FYI, Here's all the builds I tried that caused the uploader to throw the 301: #173, 174, 175, 176, 177, 178, 179, 200, 230, 240, 254, 257, 258, 259, 261, 262, 263, 264, 265 and 272. Oh and I did the testing with all reset settings and template, just to be sure.  ;)

Also, at the very least...If anyone knows some code to throw in to make it ignore the 301 error, that would be great!  ;D

Here's SWFUpload's debug log of the issue....doesn't help me any, haha.
Code: [Select]
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to /Upload for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 27200. Total: 27200
SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 301.
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Error Code: HTTP Error, File name: 123.jpg, Message: 301
Title: Re: Flash Uploader
Post by: SilentPliz on December 22, 2010, 01:58:56 PM
Hi Teslaman! :)

I also made some tests with SWFUpload, and I got a bit the same results / conclusions as you.

I think as long as rejetto have not finished the development of the "Support the session based login" (Perhaps in build 273)
the error message "301" will be inevitable ... unless you find a HFS script that will get around the problem.

For now, I choosed to ignore the error messages, and display only messages of success (it's good for cheerfulness :) )

I seeing also that Flash Player 10 crash quite often in many applications.

There is also a known bug in flash player with cookies ... it takes into account primarily the cookies of Internet Explorer, even if IE isn't the browser used to upload. ???
There is many informations about this bug, and some ways to work around are available online. (search with google: flash bug cookies)
I am not yet able to make a viable script to work around this bug.

There is also a disturbing restriction for users of SSL (https) ... Adobe Player seems does not accept self-signed certificates (it work fine with "certified certificates"). :-\

The concerns of unreliability of flash suggest that it might be better to move towards solutions only Ajax / Java based for HFS
 ... drag and drop is possible in more with some of these solutions.

I'll post the latest status of my essays, you can try ... with any luck it satisfies you.

The main difference with your solution is that with mine you can upload in any folder with the rights to "anyone"

You can also send files to a sub-folder restricted for "anyone" and located in a folder "restricted for user account".
This workaround allows to limit the "upload rights" for some user accounts.

Tell me if it works better for you.


I advise you to use for your tests the beta build 271:

http://www.rejetto.com/forum/index.php/topic,9184.msg1052472.html#msg1052472

- You put the folder named SWFUpload in the folder of hfs.exe
- You load in HFS the template included in the .zip: default.tpl

... everything is ready for operation.  ;)


Edit: Version included is the last beta of SWFUpload... use it with Adobe Flash Player version 9.028 and above.
Title: Re: Flash Uploader
Post by: teslaman on December 23, 2010, 09:42:26 AM
Thanks SilentPliz! Yep that worked. :) Unfortunately, in my setup I need to keep the other error codes intact for the users since they can't see the actual file after they upload it....short of manually typing the filename in the address bar. And thanks for the information allowing uploads to multiple folders and sub-folders. 8) I currently only use a single upload folder for everyone, but that code will come in handy if I ever need to add more! :)

As a workaround, I'm sure there is an easy way for experienced coders to exclude just the 301 errors, but sadly I am no good at writing such code. For now I just have a note on my upload page that says to just ignore the 301 error, haha. ;D

Yeah, since the 301 error only appears after the #171 build, hopefully it is just a minor bug in HFS. :) Before testing different builds, I had been hoping it was just a new bug in the Flash 10 update, but after several updates between August and now, the 301 error remained. :(

Yeah I have never been that fond of Flash. It seems more often than not that it just slows things down and causes problems, especially after Flash updates. :-X

Did you notice any improvements with the latest beta of SWFUpload? Since it also gave me the 301 error, I had previously decided to keep the older one since it still worked otherwise and was 170kb smaller in size. :o

Cheers!
Title: Re: Flash Uploader
Post by: SilentPliz on December 23, 2010, 03:47:44 PM
... Unfortunately, in my setup I need to keep the other error codes intact for the users since they can't see the actual file after they upload it....
 And thanks for the information allowing uploads to multiple folders and sub-folders. Cool I currently only use a single upload folder for everyone, but that code will come in handy if I ever need to add more!

Replace
upload_error_handler : uploadSuccess,
by
upload_error_handler : uploadError,

You will see reappear the error messages ... including the 301. :-\
------------------------------------------------------------------

With my version included in a template (*.tpl), the page is refreshed after uploads, so users can see what has been uploaded ... unless you decide otherwise in the parameters of HFS.

upload_url: "{.cut||-1|%folder%.}", will not work if you use this code in a page in html (*.htm,*.html)
This macro will works only in a template file (*.tpl) or in a "diff template".

Did you notice any improvements with the latest beta of SWFUpload? Since it also gave me the 301 error, I had previously decided to keep the older one since it still worked otherwise and was 170kb smaller in size.

SWFUpload is evolving along with Adobe Flash Player.
Some SWFUpload commands become obsolete from one version to another.
I think it is useful to keep SWFUpload updated to comply with changes in the Flash Player ... and to avoid other problems in addition of the error message 301. ;D

My version is compatible with Flash Player 9.028 to 10.xxx
....
         var settings = {
            flash_url : "/SWFUpload/js/swfupload.swf",
            flash9_url : "/SWFUpload/js/swfupload_fp9.swf",
....
Title: Re: Flash Uploader
Post by: rejetto on December 24, 2010, 04:12:47 PM
After trying over 20 builds I found that the latest stable and the betas up to build #171 all give a successful upload message...

thank you for your effort.
This is a very useful information indeed.
In build next to #171 (#173) the code for upload was heavily changed for supporting forms.
I guess that's where the problem have been introduced.
If you untick the "only served requests" in the log options, you should get a "Not served: 301 - Moved" in your HFS log. Do you?
Title: Re: Flash Uploader
Post by: SilentPliz on December 24, 2010, 07:33:35 PM
If you untick the "only served requests" in the log options, you should get a "Not served: 301 - Moved" in your HFS log. Do you?

That's right.
Uploads are still performed correctly.
And %user% does not appear in the log.

Event [+upload success] is often not executed.
Title: Re: Flash Uploader
Post by: teslaman on December 25, 2010, 12:20:45 AM
Replace
upload_error_handler : uploadSuccess,
by
upload_error_handler : uploadError,

upload_url: "{.cut||-1|%folder%.}", will not work if you use this code in a page in html (*.htm,*.html)
This macro will works only in a template file (*.tpl) or in a "diff template".

Thanks again SilentPliz for that info. ;) Hehe, yeah I'm normally all for updating too. I just really liked how lightweight 2.2 was....so did my bandwidth, haha. ;D

thank you for your effort.
This is a very useful information indeed.
In build next to #171 (#173) the code for upload was heavily changed for supporting forms.
I guess that's where the problem have been introduced.
If you untick the "only served requests" in the log options, you should get a "Not served: 301 - Moved" in your HFS log. Do you?

Cheers, I'm glad it helped. :)
Yep, I also get the "Not served: 301 - Moved" message in the log.
Edit: I figured out a bit more. I started testing the older versions of Flash Player and it's v10.0.45.2 that doesn't show the 301 error, but instead says "Complete". However, HFS (#271) does still report the 301 in the log. So the builds from #173 and up were throwing the 301, but Flash wasn't catching them until v10.1.53.64. ;)

I found a multi-upload ajax which authorizes the drag and drop towards the browser with individual progress bar, but as they are Christmas and new Year holidays, it will be necessary to wait to have sources later ;)

Cool, nice find! 8) I thought I had found one, but it turned out to be using PHP, arg.

Happy Holidays Everyone! :D
Title: Re: Flash Uploader
Post by: teslaman on July 30, 2011, 11:52:23 AM
Well guys, I have found a new, extremely cool Open Source uploading script! http://www.plupload.com/  ;D

You can upload via Flash, Google Gears, Silverlight, Yahoo!'s BrowserPlus, HTML5 and 4!  :o

I've attached an edited version of the basic JQuery UI script which I have partially tested in Flash, Gears and HTML4/5.

With all of your coding knowledge, I'm sure you guys will see many more massive potentials in this than I can, but here's one of the features that caught my eye. Server Side Image Resizing! I kept it included in the example ul.htm, just remove the comment to activate it. I thought that could be very useful to instantly create thumbnails from an upload. To set a fixed width, just set the width to what you want, but set the height to something huge. Ex: width : 50 height : 500. That way the width will always be 50, but the height will remain in the correct aspect ratio of the image. Vice versa for fixed height.

On another plus side, the setting "urlstream_upload" forces Flash to use URLStream, which bypasses that pesky 301 error in Flash. Unfortunately, it rather limits the upload progress bar functionality and also means the file is loaded into RAM first. But, with Plupload's extensive abilities, I figured that it's a temporary issue that someone with coding knowledge will be able to fix in short order.  8)

Also, it has a "chunking" feature. Apparently that is a PHP feature, but if you add "chunk_size : '1mb'," to the Settings in the ul.htm file, it does upload the file in pieces. There is just no way, that I'm aware of, to reassemble it on the server side. It also plays a role in determining/showing the upload progress. So, I have no idea if that would be a fairly easy feature to add to HFS? Like say, a Upload folder monitor that just re-merges the files once the upload is finished?

Anyways, these have just been my thoughts on it so far, no idea if they are practical, haha. I have had some issues trying to upload large files in Flash, which seems to be a problem that crops up on the Forums there as well. But, that could just be related to using the "urlstream_upload" setting and Flash not being able to handle using that large of a file (700mb) in RAM.

The JQuery UI Widget example is probably too much of a beast, there are simpler interfaces, but it was the easiest for a scripting n00b like myself, hehe. I imagine it is possible to write up a similar upload progress indicator like the one found in SWFUpload, not to mention who knows what all else that can be done with it.

Enjoy!
Title: Re: Flash Uploader
Post by: Dragon_Hunter on July 30, 2011, 02:40:42 PM
Hi

What is needed to get it to get it working and starting ?
Title: Re: Flash Uploader
Post by: crazyboris on July 30, 2011, 06:26:37 PM
if you use this on a webserver you have to set the chmod to 777 for it to work.(on upload folder)
then your server is unsafe.
just upload a phpshell and own the whole server.
Title: Re: Flash Uploader
Post by: teslaman on July 31, 2011, 06:08:06 AM
Hi

What is needed to get it to get it working and starting ?

Just unzip the attached file into a folder that has upload permission in HFS and edit the ul.htm file in Notepad if your upload folder isn't called "Upload". Change "/Upload" to whatever your upload folder directory is, save it and voila! It isn't HFS template based yet, so just open the link to the ul.htm in your browser, like a regular webpage.

if you use this on a webserver you have to set the chmod to 777 for it to work.(on upload folder)
then your server is unsafe.
just upload a phpshell and own the whole server.

No idea on PHP security and chmod since the primary use for this that I was suggesting is for HFS, to which none of that would apply.
Title: Re: Flash Uploader
Post by: r][m on July 31, 2011, 04:50:47 PM
Don't know about the security issue mentioned, but since HFS doesn't
support php, etc, I wonder if it should be a concern,

My testing shows it to work on Ubuntu 11.04/Wine, and being able to
select and upload a list of several files at once is a much needed missing
feature of HFS.

I'm going to try adding it either to my tpl as a [section] or as a remote tpl.
Changes to the css, and adding breadcrumbs, etc, and I think it has potential.
Thanks for sharing.

Title: Re: Flash Uploader
Post by: raybob on July 31, 2011, 05:08:09 PM
I managed to take the google gears api of plupload and integrate it right into my site.   Even neater is that i made it pop up with $.prompt. I'll post a template later...

(http://i361.photobucket.com/albums/oo57/RayBob328/newuploader-Copy.png)
Title: Re: Flash Uploader
Post by: r][m on August 01, 2011, 03:47:41 AM
I managed to take the google gears api of plupload and integrate it right into my site.   Even neater is that i made it pop up with $.prompt. I'll post a template later...

I'd be interested, if you'd care to share it  :)
Title: Re: Flash Uploader
Post by: raybob on August 01, 2011, 03:07:40 PM
And here it is!  Obviously you will need Google Gears for this API to work however it is easily interchangable to flash, html5, etc.  Here's a comparison of the various APIs. (http://www.plupload.com/#main)  Add the 4 js/css files to a folder called 'plupload' in your root, then copy over this template, which is the build 279 default but with the following changed to it:

Added the necessary external scripts to the template
Deleted all the upload button hiding, progress refresh etc. stuff in lib.js
added the new upload script to a section just before [box actions]
added the new upload button to the [box actions] section
changed the max width of the impromptu prompt

Also as far as the chunking thing is concerned (because even with max_file_size set the max is still 2GB per UPLOAD and so will freeze with any more) perhaps it would be possible to reassemble the file on the server by HFS, using very small chunks and then something like {.save|wholefile.txt|{.load|blah.part.}{.load|blah2.part.}.}   Just a quick thought...

EDIT:  That template is the HFS default not by RAWR-designs, but I'm sure it could be done just as easily.
Title: Re: Flash Uploader
Post by: teslaman on August 02, 2011, 06:37:40 AM
Nice work raybob95! Looks like this plupload script might finally be the winner for multi-file uploading.

Yeah I was wondering about the chunking too. I saw that rejetto had mentioned chunking when it came to "downloading big files", so I'm hoping something similar might also apply to uploading as well. Here is the topic about it: http://www.rejetto.com/forum/index.php/topic,7699.0.html (http://www.rejetto.com/forum/index.php/topic,7699.0.html)

EDIT: Great news and sad news... I managed to fix the 301 Error in Flash! ;D The sad news, since plupload doesn't retry on an error, it only half works. However, since SWFUpload does have "requeue_on_error", it works 100% now. ;D Unfortunately, uploading to a protected folder still does not work in SWFUpload, but it is working in plupload.

Here's the fix for SWFUpload:
Code: [Select]
upload_url: "http://"+window.location.host+"%url%",Edit swfupload.js and for the setting "requeue_on_error" change it from false to true.

I have no idea why Flash fails on every other file, but the retry solves it nicely. You will have to be paying very close attention to see the error message blip by for a millisecond before it requeues and finishes successfully.

The url is the same for plupload, but since it can't retry on the I/O error, every other file fails to upload. It also breaks the protected folder uploading when you remove the urlstream setting. So I don't know how we would have 100% working Flash and uploading to protected folders at the same time. :(

So, In summary, if you don't use protected folders for uploading, SWFUpload is now fixed.
Title: Re: Flash Uploader
Post by: raybob on August 11, 2011, 01:55:45 PM
The only issue I'm having with PLUpload is that once an upload completes, it waits around 45 seconds before completing the upload, meanwhile in HFS the connection is stuck on 'thinking'.  Not sure if this is a bug with PLUpload or with HFS bu I would really like it resolved.  I only have a basic knowledge of JS so I'm stumped.
Title: Re: Flash Uploader
Post by: rejetto on August 22, 2011, 04:15:55 PM
No idea on PHP security and chmod since the primary use for this that I was suggesting is for HFS, to which none of that would apply.

correct
Title: Re: Flash Uploader
Post by: rejetto on August 22, 2011, 04:17:02 PM
The only issue I'm having with PLUpload is that once an upload completes, it waits around 45 seconds before completing the upload, meanwhile in HFS the connection is stuck on 'thinking'.  Not sure if this is a bug with PLUpload or with HFS bu I would really like it resolved.  I only have a basic knowledge of JS so I'm stumped.

is this easily reproducible on my own?
Title: Re: Flash Uploader
Post by: raybob on September 28, 2011, 12:43:25 AM
Yeah see my new bug report topic although PLUpload isn't the source of the problem, luckily.
Title: Re: Flash Uploader
Post by: teslaman on April 06, 2019, 12:45:59 AM
Hey guys, did anyone ever have any luck working out the chunk option with PLUpload? I've been using PLUpload for all of these years without chunking, but I'm using Cloudflare protection now and they only allow 100MB uploads, which means I need the chunking option.

Uploading works with chunks and renaming enabled, but I end up with split files with file names, "blob", "blob (1)", etc. I've looked at the code, but I'm lost on this one. I can merge them manually with a file merger, but there's also no indication as to what the original file name was.

raybob mentioned this:
Quote
{.save|wholefile.txt|{.load|blah.part.}{.load|blah2.part.}.}
but I don't know how to implement something like that into the PLUpload code. I'm guessing it'd have to go into a form action, where it would then somehow check for a successful upload before executing. Beyond that...  :-\