-
Website
http://digitarald.de -
Original page
http://digitarald.de/project/fancyupload/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
RaYz
7 comments · 3 points
-
sim
37 comments · 1 points
-
perrohunter
11 comments · 1 points
-
michalc
8 comments · 1 points
-
digitarald
254 comments · 3 points
-
-
Popular Threads
Try this; add the session id to the action attribute in the form, e.g. <form action="myFile.php?PHPSESSID=...">
In myFile.php try this:
<?php
session_start();
session_name($_GET[session_name()]);
?>
This will set the old session name from the first file, should work.
- Adrian
Cheers
when you visit the website without the www., if i initilized the uploader with the url http://website.com /... doesnt work (cant connect and so its allways 0%), but if i initialized it with the url http//:www.website.com/... it works.
So if i initialize uploader with / without " www. ", users will be able to upload their files when visiting the website with / without " www. " respectively
thanks for your work !!
just the PHP part to replace.
foreach (string fileKey in HttpContext.Current.Request.Files)
{
HttpPostedFile file = HttpContext.Current.Request.Files[fileKey];
file.SaveAs(Server.MapPath("/Files/" + fileName));
}
Also you need to modify the Javascript to tell the action of the form, since the ID is made up by ASP.NET
How can I call some of the other functions like "onSelect" or "onCancel"?
Sorry if it's obvious but I'm not too familiar with Mootools.
Basically I want to call upload when someone selects a file.
Cheers
var myUploader = new Class(
Extends: FancyUpload2,
onSelect: function(file, index, length) {
this.parent(file, index, length); // currently not needed, onSelect just contains a debug log
$('big-red-alert').highlight();
}
});
Thanks for that, I wasn't familiar with extending classes but after some reading around I got to understand it and was able to successfully extend on the Fancyupload2 functions like the example you supplied.
Cheers.
FancyUpload2($(‘demo-status’), $(‘demo-list’), {
‘url’: $(‘form-demo’).action,
‘data’: $(‘upload_ticket’), //will convert the form to query string.
‘fieldName’: ‘upload’,
‘path’: ‘swiff/Swiff.Uploader.swf’,
‘onLoad’: function() {
$(‘demo-status’).removeClass(‘hide’); $(‘demo-fallback’).destroy();
}
});
I user mod_rewrite for my website, so I can't use GET...
I can't find a documentation...
Bist du eigentlich ein Deutscher? Im alten Code waren deutsche Kommentare xD
This is a really nice integration of JavaScript and Flash, great work.
I was using the previous version of FancyUpload and I am trying to use the brand new one. Right now I got it work, but I had to copy the Mootools.js in the example to make it work because the Mootools version don't work. That was the only problem I had (maybe it will help, who knows).
And here comes the question. Like someone who posted in the comments, I am trying to post Data along with the Files I upload. My problem is that I have a <select> items, and I would like to send Image with the Id I would select in the list of items.
How can I proceed ?
Thank you very much my friends,
J.
Who can explain me how to send POST data while uploading ? Thanks !!!!
thanks
http://paste.mootools.net/fa929569
(small note, I clicked the reply link under your post, but nothing seemed to happen. Hopefully this shows as a reply to your post, but no guarantees I guess :) )
At this time you can't give additional callbacks. To override the behaviour, extend the FancyUpload2 class (lets see how markdown works in the comments :D
var MyPhotoUpload = new Class({
Extends: FancyUpload2,
onAllComplete: function(current) {
this.parent(current);
// No alert, its callback from flash, don't make crazy things here because Flash waits for the return
console.log('Done!');
}
});
btw.: Indent your code with 4 spaces or 1 tab for code/pre. This is a test for disqus, if it plays nice with the spaces.
Again, thanks for your advices I was able to make the data sending work. Now I have another problem related to this data I post to my upload.php.
Actually, I have to select items in a select to get an id and then send the data to the proper item. Problem is the form seems to keep the first value I got from the select, no matter what I select afterwhile.
Is there a way to 'unload' the class ? Or a way to select different data to send ?
Thank yo so much my friends
J.
I have something like this :
id_evenement = even_s_c.options[even_s_c.selectedIndex].value // my value
myUploadReplacer(id_evenement) // load fancyupload
function myUploadReplacer(x) {
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'data': 'id_evenement='+x,
'fieldName': 'photoupload',
'path': './swiff/Swiff.Uploader.swf',
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
It works, but now I would like to load the uploader at the window.load event. Now I am looking for a way to change this id_evenement without loading it all the time.
I put back the original initialisation of the class so my fancyupload can load at the window.load event but that's it. I am stuck at that instance creation. I just don't know how to proceed.
My apologize to all, my knowledge are quite limites and my english sucks as well.
http://paste.mootools.net/f4ab61768
Of course it is not working ^_^
Harald, you are my savior.
Thanks for making this nice tool. I want to hide upload, browse only images, clear navigation only when upload starts.. can you tell me how will it work? I am trying to this way..
$('upload-button').addEvent('click', function() {
swiffy.upload();
document.getElementById("actions").style.display = "none";
return false;
});
but its not working when user upload nothing and click on upload button.. it hides all the links.. how can I check whether user uploaded file or not?
Thanks
at flash.net::FileReference/get size()
at uploader_fla::MainTimeline/valueOfFile()
at uploader_fla::MainTimeline/selectHandler()
Any idea? I have test, and not work...
http://blog.joshuaeichorn.com/archives/2006/03/...
With a project I'm working on and now I see this. I searched HIGH AND LOW for this and it never came up. ayayayay
I would set up this progressbar on one website using a yootheme template (that's mean there is a lot of using mootools).
So when the page is loaded, I have always the inputbox and the button, and when I go at the end of the page, and go back to the form, I ve got the only one 'browse' button as it should be.
There is a difference between firefox and IE:
- with IE / no templates using mootools: no problems
- with firefox / no templates using mootools: I need to go at the end of the page
- with IE / the mootools template: never work
- with firefox / the mootools template: I need to go at the end of the page
I check twice the mootols release was good and now I don't know what I'm supposed to do.
Please, does any body have an idea ?
(ps: sorry for mistakes, I'm french :p).
Thx
And about the mootools template, there is no longer conflict, It's fixed ;) .
But now, with the new element, it's no longer work with IE :(
Thx a lot for the firt idea: you're a genius !
Everything was working just fine until I tried it online. Indeed, I was working on local so far and everything went pretty well.
When I uploaded my website, I just got a Fatal error: Call to undefined function: json_encode() at the end of my uploading list. I checked my PHP version and it seems Json is activated so I don't know what else to do.
Did someone have some problem with Json too ?
I'm creating a database entry (what i'm calling an upload ticket), and then setting a session variable. At the beginning of my upload script, if that session variable is already created, then we don't need to create another DB entry. But I find that session variables are dropped on each request.
Anyone overcome this?
--Eric--
What was your problem ?
Can you tell me how can I get the hidden variable value? I will set the url in hidden variable and get it from there..
Thanks
Download the version of MooTools used in the demo from this site. I have tried both the trunk and the revision linked to on here and they did not work for my. I got constant "this.parent is not a function" errors from those versions of the mootools library. The solution was to sopy the version found on this site and it worked fine.
Thanks!
I added this
'onAllSelect': function() {
this.upload();
},
But nothing seems to fire? Am I also able to use onComplete and onRemove as in the old version?
Thanks!
not to long ago that indicated that the release after 1.2beta2 would not be
breaking naming conventions and high-level class/element stuff. So 1.2beta2
has Swiff as a function? Why have the 1.2b2 docs been saying it is a
class? Kind of worried now because we have built a good portion of a rather
large site on the 1.2b2 with the idea that the final release would not break
everything is this not true as well??? Any clarity you can provide would be
most appreciated! Thanks digitarald!
- Daniel
please suggest what to do...
plz check and help me solve this json problem
"This form is just an example fallback for the unobtrusive behaviour of FancyUpload."
Any ideas? Thanks
In IE7 and FF2, after a complete upload, there is an error : "Missing file or internal error!"
In Firebug, no errors :
<pre>
</pre>Uploader ready!
Browse started.
Checked in file 0/1 "dsc03586.jpg" with 138007 bytes.
Added 1 files, now we have (138007 bytes).
Initialize upload for "dsc03586.jpg".
Upload started.
Starting upload "dsc03586.jpg".
Completed upload "dsc03586.jpg".
Completed all files, 138007 bytes.
I don't understand where is the mistake. Can u help me please ?
Thanks
PS : Sorry for my poor english, I'm french
Thanks again
It does get replace when I move the scrollbar down.
It works all great, also with classic asp and Persits AspUpload. The only thing I cant figure out is after uploading I get the failed image for each uploaded file (the files did upload!). What does php actually return with: echo json_encode($result); ?? I need to translate that to asp / vbs. Please help..
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For Each fileKey In HttpContext.Current.Request.Files
Dim File As HttpPostedFile = HttpContext.Current.Request.Files(fileKey)
File.SaveAs(Server.MapPath("FileAttachments/") & File.FileName)
Next
End Sub
$extend is not defined
[Break on this error] Swiff.extend = $extend;
Class is not defined
[Break on this error] Swiff.Uploader = new Class({
how i can solve this issue ?
btw, do you have any zip file that contain everything that can working ? maybe I is easy for newbie like me to access it :) (i got a hard time to configure and modify it, but still could not make it work)
I sent you a comment hope you read it as soon.
Regards
Benjo
Object.toQueryString is not a function
http://localhost/uploader/Swiff.Base.js
Line 76
Everything seems ok, the path to the js files and everything seems complete.. this is for the old fancy upload.
I'm looking at a photo uploader for our site. I need it to be a part of a form, and I was wondering how I could get the names of the pictures being uploaded and the form data to be tied to the same ID in a MYSQL table when submited?
Can I use your uploader for this? If so, how?
Thanks!
i also included the request classes in my selection -i need to include some ajaxy page updating functions on completion of an upload
now i also have to work out if and how these request classes have changed -or have they merely changed name?-anyway thats a digression from this thread
I tried the showcase in IE and it works on your setup, though I saw a small glitch on the progress bar, but still it works, mine wont.
I also tried ver. 2.0 in IE6, I tried uploading 10 files but it only list 5 files but after uploading the first 5 files on the list, it continues on with the other files but the uploading suddenly stops with the overall progress at 39%
Thanks!
Can you please elaborate on the mootools requirement - is 1.2dev needed and which components specifically are required?
missing } after property list
[Break on this error] id_evenement: sel.options[sel.selectedIndex].value;\n
I can't find the error?
First, the browser (tested with firefox) doesn't display the following line:
<quote>header('Content-type: application/json');</quote>
As a result, I have deactivated this line of code.
Therefore, the fileComplete function doesn't work and the result is null when the script wants to execute "json.get('return')"
How can I fix this?
I need a new license for Flash, the Version I used for FancyUpload was the 30day trial. So, **donate for more** FancyUpload fixes :-D
I test on other macs with exactly the same setup it does work however.
But this one computer doesn't work, even when I boot up in windows and
check both in firefox and IE 7 it fails. There is an alert message
saying "Error". At one time firebug gave me an error with nsSession.js
and something about failing to load the component.
Sometimes it loads the js version of the uploader, at other times it
only displays the fallback form. The "Error" message appears when I
press "Browse"
Den 13/05/2008 kl. 19.04 skrev Disqus:
First, the browser (tested with firefox) doesn't display the following line:
<quote>header('Content-type: application/json');</quote>
As a result, I have deactivated this line of code.
Therefore, the fileComplete function doesn't work and the result is null when the script wants to execute "json.get('return')"
How can I fix this?
I have very little knowledge with javascript. I liked your uploader and set it up on my local server and everything is working great except the errors. If I upload files great than 2 megs, the script.log says error but the icons in the uploader do not change and the error messages dont come up. The icons stay at the picture of the paper with the yellow on the upper right and no message underneath. ANy idea why this would be happening? I downloaded and copied everything twice to see if I missed something but same results. ANy help would be appreciated. Thanks.
Josh
var json = $H(JSON.decode(response, true));
Right there is where file.info gets its value and file-info is not showing up on my page. At least I think that is what it is. In the "watch" area of firebug it says json is undefined and it says response is: "{"result":"failed","error":"Please upload an image bigger than 25px."}\r\n?>"
ANy help would be appreciated. Thanks...
Josh
The line of code is this: if (json.get('result') == 'success') The value of result during this break in firebug is:
"{"result":"success","size":"Uploaded an image (image/jpeg) with 2816px/2112px."}\r\n?>"
So it looks like json.get('result') does equal 'success' But firebug does not stop at the breakpoint I put inside the if statement. Funny thing is firebug doesn' stop at the break point I put in the else statement either. It seems like the code is not going into the if or the else... how is this possible? Using WAMP with php version 5.2.5. Sorry about all the comments. Hopefully this one gave enough info so someone might be able to help me figure this out. Thanks.
Josh
- in your demo an icon changes, error or success message appears below the file
- in my case icon changes during upload to uploading.png, but then turns back to original icon file.png and no error or success message is shown
Could you tell me in which direction should I look for the solution?
Thx!
I am having the exact same problem as you. Everything works but the individual file status and I get the normal and uploading icons but no others. If you find the answer please post it here.
- files are successfully uploaded and checked, however the feedback statuses of the uploaded files in the queue are not shown, e.g. no error / success message is dispalyed below the file name in the queue, nor icon is changed to the uploaded / error icon as it works in your demo.
Tested locally (ms win) and on the server (linux), FF 2.0 and IE 7.0
Could you try to help me in which direction to look for the solution?
Thanks!
http://picasaweb.google.com/vanovcan.michal/Upl...
Does not appear with FancyUpload v1. I am connected through t-mobile wireless broadband card.
now its working fine, just with prototype it doesn't :(
I wrote a tutorial teaching how to implement it using ASP. You can find it at http://zend.lojcomm.com.br/entries/tutorial-sta...
I see your message “Use options: data (defined in Swiff.Uploader) or return {data: …} from onBeforeOpen to set POST data”
Could you post an exemple, a Doc, a link ... for more help ;O)
Merci !
im trying to use the session variables with fancyupload but even if i pass the sessionID with GET and restart session with sesion_id(), i cant retrieve variables.
Also, it seems that i dont need to pass the sessionID because if i do
session_start();
$response = session_id ();
i can see the sessionID,
of course i'm missing something, what can i do to use the session ?
Just rewrote onSelect function
onSelect: function(file, index, length) {
var errors = [];
if (this.options.limitSize && (file.size > this.options.limitSize)) errors.push('size');
if (this.options.limitFiles && (this.countFiles() >= this.options.limitFiles)) errors.push('length');
if (!this.options.allowDuplicates && this.getFile(file)) errors.push('duplicate');
if (!this.options.validateFile.call(this, file, errors)) errors.push('custom');
if (errors.length) {
setTimeout(function() {document.getElementById('startupload').disabled = false;this.removeFile(file);return false;}.bind(this), '100');
}
(this.options.fileCreate || this.fileCreate).call(this, file);
setTimeout(function() {document.getElementById('startupload').disabled = false;}, '1000');
this.files.push(file);
return true;
},
`if (this.files.length && this.options.instantStart) this.upload.delay(10, this);`
and
`upload: function(options) {
var ret = this.parent(options);`
Where in the scope of the upload function "this" refers to the function that called, as opposed to the parent object. (Maybe the delay function is binding it to "this" instead of passing it as the argument?) Changing the original line listed to the code below fixes the problem, but obviously removes options from the upload function. I don't actually get why this is happening, but I thought I would point it out.
`if (this.files.length && this.options.instantStart) this.upload.delay(10, this);`
`if (this.files.length && this.options.instantStart) this.upload();`
And to clarify the problem I was describing - Firebug gives the following error:
'this.parent is not a function
upload(Object options=Object) FancyUpload2.js (line 149)
delay()'
v1 and v2 are looking like out of order in IE 7 actually
perhaps before it was run no ?
are u ok with that ?
thanx
One question: I have a multilingual site and it looks like I can easily change some of the text, but it seems that other bits of text might be hard-coded in the .fla. Is there a way to set the text using JS or parameters, or will I have to edit the source .fla?
Thank you . .
$('filup-browse-all').addEvent('click', function() {
swiffy.browse({'Supported Filetypes':'*.doc;*.txt;*.pdf;*.xls;*.mp3;*.jpg; *.jpeg; *.gif; *.png'});
return false;
});
$('filup-browse-files').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png','Audio (*.mp3)':'*.mp3','Documents(*.doc,*.txt,*.pdf,*.xls)':'*.doc;*.txt;*.pdf;*.xls' });
return false;
});
this code goes in fancyupload.js -but you can override these options when you instance the class
var FancyUpload = new Class({
options: {
url: false,
swf: 'Swiff.Uploader.swf',
multiple: true,
queued: true,
types: {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png' ,'Documents(*.doc,*.txt,*.pdf,*.xls)':'*.doc;*.txt;*.pdf;*.xls','Archives (*.zip,*.rar)':'*.zip;*.rar)','Audio (*.mp3,*.wav)':'*.mp3;*.wav)','Supported Filetypes':'*.jpg; *.jpeg; *.gif; *.png;*.doc;*.txt;*.pdf;*.xls;*.zip;*.rar;*.mp3;*.wav;' },
limitSize: false,
limitFiles: false,
createReplacement: null,
instantStart: false,
allowDuplicates: false,
optionFxDuration: 500,
container: null,
queueList: 'photoupload-queue',
onComplete: Class.empty,
onError: Class.empty,
onCancel: Class.empty,
onAllComplete: Class.empty
},
etc...
Also-i recommend Read the flash file object documentation for details
FileReference (flash.net.FileReference) - Version 9 -linked above
I'm trying to extend to others supported file type.
I used the code above in my newClass.
I'm able to browse files and choose any file type as specified in the .as but after launching the upload, only the images file type are uploaded.
Others file type return a 500 error.
Is there any parameters i've missed ?
Thanks
please, I try this but for me not work; just upload the jpej images. I have fancyUpload2 and all work, just want to allow more filetypes
Can I have to change more parameters in other files ?
Cheers
upload: function(options){
var current = this.options;
var alb = document.forms['form-upload'].elements['alb'].value;//parametr of form "<input type="text" name="alb">
options = $extend({data: current.data, url: current.url+'?album='+alb, method: current.method,fieldName:current.fieldName}, options);
if ($type(options.data) == 'element') options.data = $(options.data).toQueryString();
return this.remote('upload', options);
},
var qs=$('theform').toQueryString();
... url: current.url+'?'+qs
Thanks
Gabe
But when you choose a file and upload it, it doesn't appear on the server although there's the message: Completed.
Where could be the problem?
Firstly, I will say my documents I have got;
*FancyUpload2.js, Fx.ProgressBar.js, mootools-trunk.js,photoqueue.css,Swiff.Uploader.js,Swiff.Uploader.swf
So it is still not working,,,,I am going to be mad...Hey my brothers,,have you got ant zip file or explain it please!!!
my messenger address omer.ozer08@hotmail.com
go check php.net, it have more detail!
1.- Add this line at the end of removeFile function in SimpleUploader class:
if (this.files.length>0) this.upload();
2.- Edit Swiff.Uploader.swf and change this line of removeFile function:
if (!instance.fileList.length) instance.uploading = false;
with this
if (!instance.fileList.length || instance.uploading) instance.uploading = false;
Uploader ready!
Browse started.
Added 1 files, now we have (163 bytes).
Initialize upload for "fancy_bar.gif".
Upload started.
Starting upload "fancy_bar.gif".
Completed upload "fancy_bar.gif".
Completed all files, 163 bytes.
But still the error failed.png shows because of the file-failed class. Any clues why this happens?
i had "this.parent" problem, but solved it by including js-files in right order:
`<script src="/js/mootools.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/Swiff.Uploader.js"></script>
<script type="text/javascript" src="/js/Fx.ProgressBar.js"></script>
<script type="text/javascript" src="/js/FancyUpload2.js"></script>`
And my question..
If I click "Browse" and select 6+ files, there is only 5 first files going to download.
Can i increase this number from 5 to 20 for expample?
p.s. sorry for bad english. hope you understand me :)
I've set option 'limitFiles': 'false' and its works!
THANKS!
What does it mean?
P.S: Flash player 9 installed.
I'm having troubles implementing this. http://ftw.net.nz/~tristan/ajax/ is where I've set it up however whenever a file is uploaded, no log is written (script.log exists and IS writable by apache) and it returns "httpStatus 404".
I'm wondering where I've gone wrong here?
I've tried making script.php look like:
<?php
if (isset($_FILES['Filedata']) )
{
$file = $_FILES['Filedata']['tmp_name'];
copy($file, 'files/');
die('Upload Successfull');
}
?>
However that doesn't work either.
i've been trying to get this for the past 6 hours!
http://sandbox4.xtremediaonline.com/testing/upl...
and it just doesnt work...the swf file doesnt load...
i'm using firebug and i get the following errors also:
1.) Swiff is not defined
Swiff.Uploader = new Class({
2.) $ is not defined
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
3.) Class is not defined
[Break on this error] var FancyUpload2 = new Class({
------------------------------
i'm about to go nuts as nothing will work...absolutely nothing...and i've tried everything ...i've even ripped the exact files from this site and still wont work...
i know i'm doing somethign wrong.. but just dont know what...
maybe someone can point me to it?
would be very appreciated :)
but now i'm getting it to select the files...but just says "upload failed (403)" when i hit the upload button...
any suggestions on that one there?
What do you think was the problem with IE 6? Flash version? any suggestions?
Please anybody answer me.
I visited this website http://marcelsauer.com.dd7820.kasserver.com/_UP...
I copyed everything, and i put here http://www.solidumeditora.com.br/testes/ And this still don't work. What is happening?
HELP PLEASE.
I had this all working at one point and now things have stopped functioning. I moved all my sites to a new server and I changed to apache 2 during the move and am wondering if that has anything to do with the problem. When you select any number of files and tell it to start uploading the status bar changes to "Uploading" for the first file but never changes from that point on. Despite the bar never moving it does actually upload the first file, but only the first file. I just downloaded the latest versions of all the scripts and the swf thinking that might have something to do with the problem, but it didn't fix anything.
Here is the URL of a example unloader that will show you the problem:
http://johnandrosemaryand.mikeandcordelia.com/c...
Any ideas?
When i used FancyUpload. Buttom Browes File no show on internet explorer 7. I don't know why. You can fix it.
http://pastebin.com/m24a1e90a
What happend- I upload images, resize and create 3 different copies after checking dimmensions, and write in mysql in two places- first one array with all images, and second row in images table.
What is the problem? If I upload 7-8 small files my browser send images VERY fast, and script overwrite the string and add files names more times- I try to ignore that with in_array checking but nothing... Please give me your opinion- The script run very fast with small files, how I can set delay or anything order- I try with delay parametr in js files but nothing ;(...
Once again- your upload script is simply amazing!!!Respect , and Best Regards Harald - GOD bless you!!!! :)
This looks like a great tool, but installing it is driving me nuts. There are different versions of all the files out there and nothing seems to work. After trying to get this going for about twelve hours, this is the error I now get when I click on a link with the given swiffy.browse event attached:
obj has no properties
var rs = obj.CallFunction('<invoke name="' + fn + '" returntype="javascript">' ... (in mootools line 2884)
The version you use in your code is 1548, however, trunk 1555 is the one at the official site.
I've tried using an absolute path to the swf, the open file dialog is just never shown.
You can see my test site at http://test.racecar.rayon.no/admin/movieUpload.php
Any help would be appreciated!
- Peder -
Is there any additonal way to pass data to PHP script except cookies? Ive tryed to send some data (session id) through form input but it didint worked. $_POST['my_input_name'] is empty in destination PHP script. Main problem for me is that in PHP start_session function is generating new id, diferent than file from which im sending data.
Thanks for your help in advance.
Regards - KM
I'm trying to implement it, but there's always some problem in mooTools.
Currently it's
__flash__argumentsToXML is not defined
http://localhost:51596/UploadTest/mootools-trun...
Line 2950
Any ideas?
2) I case r1555 is bogus, can anybody point to a campatible download of the files.
For others out there, this is what I propose:
(*) Provide ALL working files locally on this site, that way one won't create situations with file revision inconsistencies.
(*) Create a step-by-step tutorial where parameters to the functions are decribed instead of just "referring to studying the code". Make sure things as "flash 9 is required" and "json_encode is dependant on at least PHP 5.2" is thoroughly documented.
I guess most people have problems getting things up and running. From there they can play around with configuration to get what they want. Whoever runs this forum, putting in a few minutes of work doing this will probably SAVE you lots of work in the long run since you wouldn't have to answer all the "obvious" questions. Not to mention the houndreds of combined frustrated hours of developers trying to work with different revisions and partially undocumented code. Apart from that, the application has a nice interface and works great as long as you run it on flash 9.
All nice ideas Peder, I'll make it when I earned my food with client-work, then I can spend days and weeks on updating my free downloads here, so happy users will donate 2 times a month because they see what effort of time goes into this project.
Right, I should add Flash 9 to Requirements (but its already in Compatibility). The PHP script is just an example ... and still people just copy it and ask why their uploads are not saved. So I'll not document it more since nobody reads it. I don't use this example, I have framework in all my apps with more complicated code and validation. I never just move files to a directory, I can't provide an example that people can copy and reuse for their projects. Moving an uploaded file should be no problem for PHP devs, also encoding some JSON as response ... same skills required.
I've been working on a framework and use FancyUpload2 as a part of it.
I want to report an IE bug - actually don't no whether it is a bug or a misuse (--,)
The problem is about the upload queue .. I've just take a screen shot and explain the whole problem on, hope you check it out..
Here is the link for the screen shot:
http://itkallem.com/wp-content/uploads/2008/06/...
Thanks for all this great work..
thanks again (^^,)
My question : is there any chance to get it working with flash 6 or above but not only 9+? Its seems to be big problem in usage of this script. You cant just say 9+ is standard go use it, uprgade, because as you can see you will find ppl like me with 80+ PCs in network which cant use it.
PS. Sorry for my english.
I'm facing some serious problems implementing this very fancy gadget.
I've set up an test site http://www.mediclassshop.eu/devellopment/fileup...
(just a little bit of space that's from a friend of mine)
I've done the follwing:
downloaded Mootools 1.11 (full version)
downloaded all the files listed in the instruction.
they are stored here: http://www.mediclassshop.eu/devellopment/fileup...
I also set up the script.php file and a script.log file (with read/write permissions)
Next I've changed the location of all the files.
I've Used FireFox 2.0 and IE7 for running the script, but neither are working.
Can anyone see/say what i'm doing wrong?
I read something about absolute paths and disable javascript, but i'm not quite sure how to do these things?
Thanks in advance!
Bob
Firebug, a gift from heaven (A)
One I selected the items, it is not possible to remove them, because nothing is showing.
I do not want the picture, but just the text: Remove
How can I achieve this?
TNX
I implemented FancyUpload and it's working sooo great!
Except for Safari on Mac. It's not posting any file to the server. The Request.Files collection always returns empty on Safari (it should return N where N are the uploaded files).
Any comment on this issue?
Thanks! Cordially, Agustin.
- I'm getting an HTTP Status 302 response when uploading any file.
- The post seems not to be reaching the server at all, the aspx file receives no request from the FancyUpload.
Any clue?
302 is a page moved or a redirection.
The Uploader file is hosted in a folder that requires authentication.
When the flash uploader sends an unauthenticated request to that file, the server redirects to somewhere else (login page).
Thus, the flash uploader never reaches the right upload file and keeps borking an httpStatus 302.
Thanks for your support Harold!
Cordially,
Agustin
Flash never received the right response because the server was preventing it from reaching the uploader in the protected folder.
It would be great we could preserve session state. I think it will never be able as long as we work thru the flash uploader, right?
Thanks and good bye! Agustin
Any idea what's making this happen? If you choose a set of images that hits the 4mb size for a total and then hit upload, my browser is hanging for quite a while.
Other solutions: Java Applet (even allows drag+drop), PHP + APC Upload (only progress, no multiple-file-dialog), hidden iframes (no progress, no multiple-file-dialog).
I'm fighting quite a bit here with onBeforeOpen. My goal is quite basic : pushing 2 text attached to each file.
To add the form fields for each file I've added a couple of these :
new Element('input', {'type': 'text', 'name': 'titre', 'id': 'titre', 'class': 'inputbox', 'maxlength':'250', 'size': '25', 'value': file.name}))
in the fileCreate function of FancyUpload2.js.
To pass my variables I've tried several things, but I'm probably wrong all the way as my understanding of the option syntax is quite limited.
I've tried to use the example you provided jyuza with but I get a "swiffy is not defined" error.
I've also tried to put a onChange action in the form field, and then run a function that will set the options for swiffy, but it can't access my function either.
Can I have a quick syntax sample to push my variables to onBeforeOpen ?
Thanks,
Have a nice day !
http://paste.mootools.net/f591d1f1
I get a "Type Error".
My url generation works if I put it out of onBeforeOpen and an alert in onBeforeOpen proves that i'm going through that event.
Any clue to get the url to be used ?
`'onBeforeOpen': function(file, options) {
options.data = {'test': file.name};
return options;
}`
How do I collect the data in my upload.php ?
As I dont understand this piece of the process I've been poking around things like $_POST['data'] $_POST['test'] $_FILES['photoupload']['data'] $_FILES['data'] $_FILES['photoupload']['test'] $_FILES['test'] but with no success. What's the good way to catch the variable ?
Thanks again :)
To test, then simply put this line in the head section of your html code:
<link rel="stylesheet" type="text/css" href="http://digitarald.de/project/fancyupload/1-0/assets/example.css" />
Once you've managed to get it working you can copy the CSS to your local site and tune as required.
Hope this helps others out as it was driving me nuts.
Seri
Fred.
Second thing, may i know where to find the 500 httpstatus error?
thanks
The only errors that I've got from IE is:
"FancyUpload' is undefined" on the line were this code is:
var upload = new FancyUpload and so on...
Do you know whats wrong?
You can visit my site at http://dump.slicx.com
Im hoping you can help me :)
"Getting FancyUpload to Work"
http://www.rioleo.org/getting-fancyupload-to-wo...
How can I change the directory of destiny of my uploaded files???
Thanks
How can I change the directory of destiny of uploaded files???
Thanks
http://weblog.cahlan.com/2006/09/uploading-file...
v2.0
# Added: Set POST and GET data for the upload request
Is it possible for an example of adding POST data. e.g. I want to send a manually specified post date from another field on my form that will be used to generate a path to store the images, any example of attaching more POST data to be sent with the file uploads is what I'm after.
Cheers!!
'data':$('form-extra'),
for example
var swiffy = new MyFancyUpload($('filup-status'), $('filup-list'), {
'url': $('form-filup').action,
'data':$('form-extra'),
'fieldName': 'fileupload',
'limitFiles': 1, //single file only
'path': 'js/Swiff.Uploader.swf',
'onLoad': function() {
$('filup-status').removeClass('hide');
$('filup-fallback').destroy();
}
});
the data from your form will be in the $_POST array available in the upload handling file
if you have a form for more data with id of ‘form_extra’ then add this line in the options of your FancyUpload instance
‘data’:$(‘form-extra’),
for example
var swiffy = new MyFancyUpload($(‘filup-status’), $(‘filup-list’), {
url’: $(‘form-filup’).action,
‘data’:$(‘form-extra’),
‘fieldName’: ‘fileupload’,
‘limitFiles’: 1,
‘path’: ‘js/Swiff.Uploader.swf’,
‘onLoad’: function() { $(‘filup-status’).removeClass(‘hide’);
$(‘filup-fallback’).destroy();
} });
the data from your form will be in the $_POST array available in the upload handling file
<pre>
</pre>$('demo-upload').addEvent('click', function() {
if (swiffy.getFileList() == '') {
console.log("upload clicked but no files");
$('form-extra').submit();
}else {
swiffy.upload();
}
return false;
});
tried the Sim's solution, but it doesn't work, the $_POST array doesn't have the value of my extra input, which i create each time i choose a file to upload.
So an input (name="test" and id="test") is created when i choose a file, then i tip in a value and i hit "upload" (submit if you want) but then the $_post['test'] is empty! while i added ‘data’:$(‘test’), in the fancy-upload class...
i don't understand what i did wrong
thx by advance, the version 2 is so nice :)
Is there a workaround for this? When I leave that code in there, the stylized button lays BEHIND the button generated from the script. Can I just disable that button somehow?
Thanks,
Dave
Congrads for your Great work!!...
Do work on the documentation - "how to use". It will be really helpfull for everyone.
Regards
niranjnn
#1
Class is not defined
FancyUpload.js
Line 37
#2
FancyUpload is not a constructor
Line 31
if (props.params) append.push(Object.toQueryString(props.params));
Also needed to rearrange the order the files are loaded in:
<script type="text/javascript" src="mootools-release-1.11.js"></script>
<script type="text/javascript" src="Swiff.Base.js"></script>
<script type="text/javascript" src="Swiff.Uploader.js"></script>
<script type="text/javascript" src="FancyUpload.js"></script>
I am getting this error, and was hoping someone could help.
this.parent is not a function - this.parent(options);
I am able to install the fancy upload , and upload is working fine. But i dont see the progress in the progress bar. I am not able to find those files like
assets/failed.png
assets/success.png
assets/uploading.png
assets/file.png
assets/progress-bar/progress.gif
and I hope placiong these file progress.gif in the respective paths should fix the problem of the progress bar not displaying. Please shed some light on this matter.
Thank you.
Rakesh
go to http://digitarald.de/project/fancyupload/2-0/as...
right click and save image as
thanks
do u have fixed the IE bug with the limitFiles option ?
thx a lot
I'm using firefox 3 beta5 on ubuntu and I have trouble using your showcase, it seems like files upload first (making freeze firefox) then the uploads bar moves ...
i still don`t understand how to send my $_FILES info to the action="" file. can somebody help with me, with that session :P
my form is like this:
<form id="uploadform" action="test.php?SESSID=so23jm3ub520ul59p9rikm03a7" method="post" enctype="multipart/form-data" class="jNice">
and on test.php i put:
$sessionid=isset($_GET['SESSID'])?$_GET['SESSID']:null; if (!empty($sessionid)) { session_id($sessionid);} if( !isset($_SESSION) ) { session_start(); }
deg($_FILES);
what i do wrong ?
ps: deg is my function with "<pre></pre>" and i have in my config.php a session_start();
**firebug error**
[ this.status has no properties
[Break on this error] this.overallTitle = this.status.getElement('.overall-title'); ]
SecFilterEngine Off SecFilterScanPOST Off
My permissions are correct, also. Yet I still get the 403 error. Is there something I need to edit in FancyUpload? Does it accept video uploads?
This 403 error has been eating away at me for a couple of months. I'll check the server logs. Thanks, digitarald.
The server log really doesn't tell me anything.
Thank you for your script!
I need to insert two or more FancyUpload forms on a single page dynamically. Equal IDs do not allow the script to work properly. Could you please advice how can I quickly do this?
Thanks
All files are in the root of a DIR. All paths to JS and CSS's are set appropriately. The SWFs are there.... looks like everything should work... but it's not. :(
Hi, FancyUplad look very good. Usefull and easy as is possible. I copied all of code in example and everything is good. I am using it on my localhost. When i press UPLOAD upload really starts, but I can not see uploaded files in directory :-) Can someone help?
I am not able to make the progress bar work. where can i find the files uploading.gif , progress.gif etc?. Please help. I am stuck at this point with no progress for some days now.
Thanks in advance for the help
Rakesh
2. everything works great except attempting to upload files larger than 1MB causes long delays, with larger files completely timing out (and sometimes crashing the browser). this is true for FF 2.0 and IE 6.0. uploading files without this kit works MUCH faster
3. you cannot read page 3+ in these comments, since the link for "Next" and "Last" don't work on page 2.
selecting a file too large passes zeros (files.length == 0, current.bytesTotal ==0) to onSelectAll in firefox, but it passes the file data (files.length ==1, current.bytesTotal == XXXXXX) in IE
i'm thinking of putting a filter similar to onSelect, but is that the best place for it?
The status bar signals me "Completed", but if I try to echo something in test2.php I cannot see the result. Where is the target of this second file?
Thank you very much!
Thanks
http://www.rioleo.org/getting-fancyupload-to-wo...
Thanks for the response, but i had already double checked all the paths. The problem was that I was not able to find the two files progress.gif and uploading.png, anywhere in the site.
Thank you Rio,
Your website will be usefull for the newbies. I dont know from where you found the two images progress.gif and uploading.png, but It helped finish off my pending work. :)
Again..great work Herald :) .please look into the documentation of this work. it will be a great help.
Thanks ..
Rakesh
Interface looks good: check! uploading files working: check! progress bars progressing: check! File exists after upload...nope. So, exactly where IS this stuff uploading files to? I'm combing the js files for clues to a "folder" or "url" variable but I come up with nothing. If the default state of the upload is to dump it into whatever folder the php script is in, it ain't workin'.
Help!?
Thanks!!
$('demo-browse').addEvent('click', function() {
swiffy.browse(THIS IS WHERE YOU CHANGE THE FILE TYPES)
once again, give thanks for an excellent piece of work...
peace
The fancyupload works like a charm for me :-)
But there's one question coming to my mind: is it possible to select a file by using a common javascript file browser (<input type="file" ...) and then submit the file-path to the swf?
after submitting the form, a popup should appear, showing the progress bar. I wouldn't need multiple file upload on this one...
I remove the piece of code that check the file size, and even so the file can not be uploaded.
And isn't possible correct it on javascript, so it must be something in flash.
Thanks
I have tweaked Fancy upload to suit my purpose. Is there any limitation on file size in swf file. I get security error 2038, when i try upload file sized 70 mb. ( the server is configured for more than that)
Thanks in advance/
http://www.kawoa.com/V2/
Test with FF2, FF3, it's ok.
Test with IE, I have an error when i press on "Chercher une vidéo"
Do you have a solution, can an update fix the problem ?
(Excuse Im french, I don't speak english very well)
updateOverall: function(bytesTotal) {
if(bytesTotal <= 0)
{
this.bytesTotal = 0;
this.overallTitle.set('html', 'Overall Progress');
}
else
{
this.bytesTotal = bytesTotal;
this.overallTitle.set('html', 'Overall Progress (' + this.sizeToKB(bytesTotal) + ')');
}
},
I have used fancy upload on a couple of projects, I love it, it is a awesome upload script. I have one question, what would be the best approach to do the following:
I am working on an image gallery upload, in which each gallery has one "cover" image. I would like to have a radio button or checkbox with each file in the upload list, so that you can select one of the images as being the "cover image" before uploading.
Any ideas on how I can achieve this?
Can I send additional data?
You can change the upload URL in the upload() method (append GET parameters), but it is easier to send an Ajax request where the filename acts as index for more form values. In the forum is an example from Josh Beck on using Ajax to send additional data.
Problem is, the forum is down... internal server error 500
I guess I just have to wait until the mootools forum works again, but just as as a suggestion, could you include this information here on your website for the future? :)
Just to explain what I am trying to do, I want to have a radio button/checkbox with each file in the upload list, then when it uploads, I want to use that extra value to put a 1 or 0 in the database in the cover column, so one image can be marked as being the cover of the gallery. I am not asking for help to create the script that actually uploads and does the database entries, I just need to know how I can pass on extra form values with each file...
ok this is weired... you removed the above mentioned Q & A... does that mean it is not possible anymore, or that the forum has been taken down for good or what?
I'd really like to figure this out, anyone?
the form needs no target because mootools will help get the data from it during the swiffy upload
in your javascript instance of the file uploader you can use the option
'data':$('form-extra'),
for example
var swiffy = new MyFancyUpload($('filup-status'), $('filup-list'), {
'url': $('form-filup').action,
'data':$('form-extra'),
'fieldName': 'fileupload',
'limitFiles': 1, //single file only
'path': 'js/Swiff.Uploader.swf',
'onLoad': function() {
$('filup-status').removeClass('hide');
$('filup-fallback').destroy();
}
});
all the data from form-extra will be available in the POST array in your upload processing script-which is the target of your fancy uploader form
The form needs no target because mootools will help get the data from it during the swiffy upload.
In your javascript instance of the file uploader you can use the option
'data':$('form-extra'),
for example
var swiffy = new MyFancyUpload($('filup-status'), $('filup-list'), {
'url': $('form-filup').action,
'data':$('form-extra'),
'fieldName': 'fileupload',
'limitFiles': 1, //single file only
'path': 'js/Swiff.Uploader.swf',
'onLoad': function() {
$('filup-status').removeClass('hide');
$('filup-fallback').destroy();
}
});
All the data from form-extra will be available in the POST array in your upload processing script-which is the target of your fancy uploader form
Also this commenting system wont keep me logged in.
There are many helpful hints in the comments but the navigation is a bit broken.
for the newbies (as I am) :
1) add 'data' : $('form-extra'), in your window.addEvent('load', function() { you have in your script part of your HTML file, as explain above.
2) add a form like that :
<form method="post" enctype="multipart/form-data" id="form-extra">
<input name="foo" value="bar">
</form>
3) that's it!
I am doing this as per the steps. I can't get any of the values to come across in the array. If you can think of anything I should check please give ideas.
Thanks,
lance
Thanks,
Lance
By the way, I had fixed already that problem I have told you, it’s that if you’re flash plugin (this is in linux), is in build less than 124 (I think so), it doesn’t work. The flash plugin I have with problem was in build 48, so that is 9.0.48.0, It works great in 9.0.124.0. In order to know that, you can check under adobe’s site http://www.adobe.com/products/flash/about/.
BTW, I had added this stuff like
if (Browser.Plugins.Flash.version < 9 && Browser.Plugins.Flash.build < 124) then it should do the fallback demo, this is just in linux. I tried with my friends notebook, he has 9.0.45.0 in Windows XP, and it works actually. Hope this helps!
Any idea ?
Thanks
:)
Download the following image files:
http://digitarald.de/project/fancyupload/2-0/sh...
http://digitarald.de/project/fancyupload/2-0/sh...
http://digitarald.de/project/fancyupload/2-0/sh...
http://digitarald.de/project/fancyupload/2-0/sh...
http://digitarald.de/project/fancyupload/2-0/sh...
http://digitarald.de/project/fancyupload/2-0/sh...
Be sure that the path to each of these files are specified correctly in CSS Stylesheet and the XHTML Markup
However i want to update a list of images uploaded after the upload. I try to use the function OnComplete but it doesn't work.
Somebody have already succeed this ?
Also, for the newbies and for other support, please feel free to check out my extension page:
http://www.rioleo.org/getting-fancyupload-to-wo...
Once again, all thanks and kudos go to the amazing Harald. Just a bit of support needed, which I intend to provide.
You can see what I mean here : http://www.immobiliers.tv/FU2.jpg
Thanks
Extends: FancyUpload2,
onAllComplete: function(current) {
this.parent(current);
// No alert, its callback from flash, don't make crazy things here because Flash waits for the return
//this is where we can do ajax calls to update the page
updatepage();
console.log('All Done!');
}
});
function updatepage (){
var updata=new Request.HTML(
{url: 'getsomedata.php',
method: 'get',
evalScripts :false,
update:$('test')
});
updata.send();
}
First of all: Thanks for putting this out there!
Now. I have implemented this and i run into an IE problem. It was working until recently but now when i klick Browse i get an error. FF3 on the other hand is doing great!
Im running IE7, (latest) mootools 1.2 compressed build YUi compressed. Error IE gives me is at rule 266 of mootools js.
I would be happy to give more info if someone wants to help me out
Greets Mark
also for sollutions or support mail me at: mark.mooibroek at gmail dot com
traced back to
Swiff.remote = function(obj, fn){
var rs = obj.CallFunction('<invoke name="' + fn + '" returntype="javascript">' + __flash__argumentsToXML(arguments, 2) + '</invoke>');
return eval(rs);
};
where obj is undefined ( Rule 2950 in non-compressed mootools )
hope some guru can help
Problem solved. Was a browser issue. I tried it on other computers and it worked in IE7. ILl go and reïnstall my IE7.
Greets Mark Mooibroek
Thanks for the work on this work its great and have it going but want to make a change that am struggling with.
How do I pass/post a value with the file? This would really give me the ability to use the multi upload feature.
Thanks for any help,
Regards Lance
http://www.flashuploaded.com
there are nice flash upload components to integrate easily in a website with a upload progress bar time remaining, file/folder manager etc... i tried it and works very well.
thanks
Instead of using the 'data': $('extra-form') method, I added an input element under the fileCreate function within FancyUpload2.js.. Can it be done that way?
Right now, it shows an input field for entering a name right above the file name span element for each file.. I just need to know how to send that data and retrieve it with my php script.. Please help!
thanks,
i am wondering if there is any way to execute server side code just before the upload begins. I mean, when the user press "upolad" link just before the file begins to upload i need to execute the server code(for example to set a session variable). Any idea?
Regards
Regards
var MyFancyUpload = new Class({ Extends: FancyUpload2, onAllComplete: function(current) { this.parent(current); // No alert, its callback from flash, don’t make crazy things here because Flash waits for the return
//this is where we can do ajax calls to update the page
updatepage();
console.log('All Done!');
}
});
function updatepage (){ var updata=new Request.HTML( {url: ‘getsomedata.php’, method: ‘get’, evalScripts :false, update:$(‘test’) }); updata.send(); }
var MyFancyUpload = new Class({
Extends: FancyUpload2,
onAllComplete: function(current) {
this.parent(current);
// No alert, its callback from flash, don't make crazy things here because Flash waits for the return
//this is where we can do ajax calls to update the page
updatepage();
console.log('All Done!');
}
});
function updatepage (){
var updata=new Request.HTML(
{url: 'updata.php',
method: 'get',
//data: params,
evalScripts :false,
update:$('test')
});
updata.send();
}
Harald sack this pathetic comment system
Note that you must use the new Request class to do an Ajax update of your page.
Hope that helps someone.I got this information from an early comment in this broken commenting system.
Any idea what could be the reason for that. I tried it on my own site, there I get the error "Upload failed (505)" ...
thanks
Thanks for making such a great piece of code by the way!... I am about to include it in a site I'm working on. However...
I can't get the demo to work on Firefox 3. The upload gets to 100% (usually), but it doesn't ever give the "uploaded an image" message, with the size of the image, which does appear in Firefox 2. Any suggestions on how to get this to work?
Michal
This fine script don't work when you use FF3 together with extension "Adblock" (i have version 0.5.3.043).
Solution is neither disabling Adblock nor whitelisting you website - you must disallow Adblock in Extension manager. Tested in Windows.
http://porfusion.com/blazertees/test.php
thats what i have right now- and thats as far as i can get, any help is greatly appreciated
once the limits is set to 5,bu I chose 10
so ten files would be uploaded
When browse() is executed, an alert of 'Error' will appear!
I am using PHP 4, and while I know that PHP 4 does not support the json_encode() function, I was able to find a couple lines of code on php.net which will output the same as the json_encode function. I have included it here:
foreach($result as $key=>$val) $arr[] = "\"$key\":$val";
echo '{'.implode(', ', $arr).'}';
The problem is that the ajax handling code is not reading it as a json_encoded string. and is displaying my success message as if it were an error. Here is what is being read as an error:
{"result":success, "size":Uploaded an image (image/jpeg) with 400px/300px.}
Do you have any idea why this is happening, or am I just out of luck if my PHP is not version 5.
Any help would be greatly appreciated, thank!
I am currently having trouble viewing the Fancyupload showcase demo on IE6. I visited this website a couple of days ago and It worked. But now the input element does not get replaced. (Even after several refreshes, and clearing the cache) I only see the message "This form is just an example fallback for the unobtrusive behaviour of FancyUpload. " and a regular input browse button. I am currently using IE 6.0.2900.2180 and my flashplayer is version 9.0.124.0. IE7, FF3, and FF2 work fine, just IE6. Any idea on how to prevent this problem? I wish to use fancyupload on my own personal page, so I hope there is a workaround. Thank you.
but it still can select the file size over 100 and more than 5 files to upload,
Is only does not show the file on the page...
In flash, the following code
ExternalInterface.call(instance.target + '.onSelect', valueOfFile(file), i, ref.fileList.length) !== false
won't work with IE 7, only returns 'null' then all files would be added in flash.
e.g. even if set the limitFiles to be 5, 5 files are displayed in the list but the other files are still included in uploading queue and uploaded if clicking "upload".
Anyway, awesome work all around.
Thanks!
I found a quick & dirty fix. You need to had that code at the end of line 54 of swiff.uploader.js :
.set('style','height:0')go there
in the form i added:
<input name="hid_value" type="hidden" value="<?php echo $my_value?>"
And in the script
echo $_POST['hid_value']
outputs nothing.
as i remember by default 'data':null;
See the code below:
var swiffy = new FancyUpload2($(‘demo-status’), $(‘demo-list’), { ‘url’: $(‘form-demo’).action, ‘fieldName’: ‘photoupload’, ‘path’: ‘Swiff.Uploader.swf’, ‘data’: {var1:’test123’, var2:’test456’}, ‘onLoad’: function() { $(‘demo-status’).removeClass(‘hide’); $(‘demo-fallback’).destroy(); } });
Then in your php, capture this value by $_POST[‘var1’]. Then what to do next is totally up2u.
I know where the events are in the script, but I just don't have enough knowledge of JS (although going through almost all the W3CSchools lessons) to modify it in the right way.
How can I achieve this?
change your fileCreate function to look like this:
fileCreate: function(file) {
renamed = new String;
peices = file.name.split(".");
ext = peices.pop();
if(file.name.length > 30) {
renamed = file.name.substr(0,30) + "…" + ext;
} else {
renamed = file.name;
}
file.info = new Element('span', {'class': 'file-info'});
file.element = new Element('li', {'class': 'file'}).adopt(
new Element('span', {'class': 'file-size', 'html': this.sizeToKB(file.size)}),
new Element('a', {
'class': 'file-remove',
'href': '#',
'html': 'Remove',
'events': {
'click': function() {
this.removeFile(file);
return false;
}.bind(this)
}
}),
new Element('span', {'class': 'file-name', 'html': renamed}),
file.info
).inject(this.list);
},
if it's too long, it'll show up as mylongfilena...jpg
http://tommycutter.com/code/fancyuploadfix.js
here is what Harald posted
var MyPhotoUpload = new Class({
Extends: FancyUpload2,
onAllComplete: function(current) {
this.parent(current);
// No alert, its callback from flash, don't make crazy things here because Flash waits for the return
console.log('Done!');
}
});
hope this will be formatted correctly
disqus-your comment system is quite flawed
I have some problem using the class class.upload.php from http://www.verot.net
1 - one place, 0 - other place (checkbox switching).
For example, either in the editor or in separate gallery (Sorry for my engl.).
When add you js code for initializing the uploader, add 'data' and give it an object. e.g {var1: 'value1' , var2:'value2'}
See the code below:
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': 'Swiff.Uploader.swf',
'data': {var1:'test123', var2:'test456'},
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
Then in your php, capture this value by $_POST['var1']. Then what to do next is totally up2u.
if (isset ($_POST[‘var1’])) echo “var 1 is set”; else echo “var 1 is not set”;
and also
mkdir($_POST[‘var1’]);
After the all file upload completed, there was no new folder created and the echo output “var 1 is not set”.
I have checked the error console in Firefox, but there is no error related to the fancyupload js.
Is it possible to show me the complete codes that you use to pass the data to the file handling script? or can you tell me what I did wrong? thanks.
replace 'post' for 'get'. method: 'post', -> method: 'get',
in XHTML Markup o your html form:
<form action="script.php?var1=<? echo $var1; ?>&var2=<? echo $var2; ?>"
in script.php :
<?
$variable1=$_GET['var1'];
$variable2=$_GET['var2'];
.
.
.
?>
Thanks
See the code below:
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': 'Swiff.Uploader.swf',
'data': {var1:'test123', var2:'test456'},
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
Then in your php, capture this value by $_POST['var1']. Then what to do next is totally up2u.
I have tried your method of sending data. However, it somehow does not work for me. Since I want to pass some variables to another script after files uploads are complete, I have typed the following (I write my script in PHP):
'data': {<?php echo TFP_COL3.":'".$url_post_content."', ".TFP_COL5.":'".$url_post_title."'"?>}
(TFP_COL3 & TFP_COL5 are constants of my PHP script)
so at the receiving end (The another script), I have typed:
echo $_POST[TFP_COL3]; and echo $_POST[TFP_COL5];
to capture the variables.
Also, I typed the following:
'onAllComplete': function() {
this.currentText.set('html', 'All Uploads complete! Reloading this page...');
window.location = "<?php echo FILENAME_OPEARTION_ADDTOPIC; ?>?complete=1&preview=<?php echo $_COOKIE["PREVIEW"]; ?>";}
at the js code for initializing the uploader to redirect my page to the another script with some $_GET method data (which are complete = 1 and preview = $_COOKIE["PREVIEW"] to indicate the files have been uploaded successfully and completely) after file uploads are complete. Therefore, if the ‘data’: {var1:’test123’, var2:’test456’} method works correctly, I will be seeing data of TFP_COL3 & TFP_COL5 echo on the receiving script. However, I do not see the results that I expect. Can someone help me? Thanks.
The role which directly communicates with PHP is Flash, not javascript nor your browser. So all the text from "echo" in the PHP is captured in Flash then pass to javascript.
And if necessary, use "Error console" from FireFox to check if there's any javascript error in your code as your codes are mixed with php then and in case PHP outputs anything which may screw js.
(maybe in your PHP which handles file uploading, try "mkdir($_POST[TFP_COL3])" and see if the folder named TFP_COL3 could be created ?)
good luck! :)
Ok, I gave up trying my codes, so i just used your example (‘data’: {var1:’test123’, var2:’test456’}) to see the result and maybe i could figure out what went wrong. In my PHP script which handles file uploading, I typed the following:
if (isset ($_POST[‘var1’])) echo “var 1 is set”; else echo “var 1 is not set”;
and also
mkdir($_POST[‘var1’]);
After the all file upload completed, there was no new folder created and the echo output “var 1 is not set”.
I have checked the error console in Firefox, but there is no error related to the fancyupload js.
Is it possible to show me the complete codes that you use to pass the data to the file handling script? or can you tell me what I did wrong? thanks.
Here is the js code for initializing the uploader:
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': 'Swiff.Uploader.swf',
'data':{var1:'value1', var2:'value2'},
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
/**
* Various interactions
*/
$('demo-browse-all').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-browse-images').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
return false;
});
$('demo-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
then in the PHP, try to do something with $_POST['var1'] and $_POST['var2'].
The principle is, in Swiff.uploader.swf, flash receives the parameters from js, in this case, the name of file input field (photoupload), the PHP url for uploading the file (the action you specify inside <form> tag, and the data object in {param1:'value1', param2:'value2'} format ({var1:'value1', var2:'value2'}).
Then inside flash, it generates the file selector (single or multiple, in this case, multiple which is made by FileRerenceList object in flash).
After user selects the files, flash will loop each file inside the FileReferenceList, then use "data" object passed by javascript to generate additional parameters which are to be sent together with the looped file, then create the URLRequest by the passed PHP script url, send the file with additional parameters (all by POST), and calculate the bytesTotal and bytesLoaded values in order to let javascript show the real-time status of file uploading. Once one file is uploaded, upload the next file from FileReferenceList in flash.
The in the PHP, it only receives the $_FILES[] and other values sent by POST from flash (originally from javascript "data" object). Then what to do with these inside PHP is another story.
Hope this comment can help you developing your work smoothly! :)
Since I want my php script to fetch data after all file uploads complete, I redirect to that PHP script page by inserting a " window.location = ..." statement within "‘onAllComplete’: function() {...}" However, I didn't know that fancyupload script is no longer responsible for the data transfer during the redirection after all file uploads complete; therefore, fancyupload did transfer that 'var1' variable to my PHP script in each file uploading loop, but after all file uploading loops are done (All file uploads complete), fancyupload only does whatever codes within "‘onAllComplete’: function() {...}", and will not transfer the data that contained within the initialization (‘data’:{var1:’value1’, var2:’value2’}). I solved this issue by creating a javascript setcookie function to send the data i want to send during the redirection, and of course, i can still receive the cookie by using $_COOKIE['var1'] on my receiving PHP script.
Anyway, thank you for spending your time answering my questions (and clarifying my confusion!).
at
$url_post_title.”’”; ?>}
but it is still not working.......
http://wordpress.org/support/topic/177127
http://www.adobe.com/cfusion/webforums/forum/me...
Thank you.
Thanks,
Alex
For all file uploads completion:
At the js code for initializing the uploader, add the js scripts you want within 'onAllComplete': function()
Here is the working codes example:
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': 'includes/uncached_swf.php',
'data': {<?php echo TFP_COL3.":'".$url_post_content."', ".TFP_COL5.":'".$url_post_title."'"?>},
'onAllComplete': function()
{
this.currentText.set('html', 'All Uploads complete! Reloading this page...');
window.location = "<?php echo FILENAME_OPEARTION_ADDTOPIC; ?>?complete=1&preview=<?php echo $_COOKIE["PREVIEW"]; ?>";
},
'onLoad': function()
{
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
so as you probably can see from my example, I have added a text string of "All Uploads complete! Reloading this page..." and redirected to another script page by "window.location = "<?php echo FILENAME_OPEARTION_ADDTOPIC; ?>?complete=1&preview=<?php echo $_COOKIE["PREVIEW"]; ?>";" after all file uploads complete.
For a single file upload completion, I am not sure that my following solution works, since I never need to execute any script after a single file upload completion. My solution: just add 'onComplete': function() {} at the js code for initializing the uploader, and include whatever js script you want within the function. I hope this helps.
I have problem for send other data with upload.
please post complet swiff.uploader.js with insert other data ( ex:var1)
great thank's
I have problem for send other data with upload.
please post complet swiff.uploader.js with insert other data ( ex:var1)
great thank's
Here is what FireBug returns:
`code`__flash__argumentsToXML is not defined
transition()(function(), "browse")mootools.js (line 266)
remote()()mootools.js (line 265)
browse()(undefined)Swiff.Uploader.js (line 70)
parentOf()()mootools.js (line 95)
browse()(undefined)FancyUpload2.js (line 138)
(?)()()galvenais.js (line 73)
D()(Object $extended=true event=Event click type=click)mootools.js (line 169)
[Break on this error] }});Swiff.CallBacks={};Swiff.remote=func...rgumentsToXML(arguments,2)+"</invoke>");`code`
did you change this line of code?
'path': '../../source/Swiff.Uploader.swf',
if (isset ($_POST['var1']))
echo "var 1 is set";
else
echo "var 1 is not set";
and also
mkdir($_POST['var1']);
After the all file upload completed, there was no new folder created and the echo output "var 1 is not set".
I have checked the error console in Firefox, but there is no error related to the fancyupload js.
Is it possible to show me the complete codes that you use to pass the data to the file handling script? or can you tell me what I did wrong? thanks.
From my understanding, the principle of this program is, in Swiff.uploader.swf, flash receives the parameters from js, in the online example, the name of file input field (e.g. photoupload), the PHP url for uploading the file (the action you specify inside <form> tag or manually typed for parameter 'url' when creating swiffy object), and the data object in {param1:’value1’, param2:’value2’} format (e.g. {var1:’value1’, var2:’value2’}).
Then inside Flash, it generates the file selector (single or multiple, in this case, it is multiple which is made by FileRerenceList object in flash).
After user selects the files, flash will loop each file inside the FileReferenceList, then uses “data” object passed by javascript to generate additional parameters which are to be sent together with the looped file, then creates the URLRequest by the passed PHP script url, sends the file with additional parameters (all by POST), and calculates the bytesTotal and bytesLoaded values in order to let javascript show the real-time status of file uploading. Once one file is uploaded, upload the next file from FileReferenceList with the same facility.
Then in the PHP, it only receives the $_FILES and other values sent by POST from flash (originally from javascript “data” object). Then what to do with these inside PHP is another story.
Any ideas?
e.g. "url", "http://your_domain_name/file_upload.php" rather than "url", "file_upload.php". In the online example, this "url" is obtained from "action" attribute of <form> tag.
Just a suggestion, have yet to test in safari... :P
the mime type is messing arround cannot get moveuploadedfile work. I get an application octet stream aAny ideads? Pm me at lord_d_seis@yahoo.com
Bug: 6th file is NOT showing up in UI(File Upload page).But,"6th" file is Uploaded in DB .
This bug exists in IE, bug it is ok in firefox. Please help me take a look. Thanks!
The result is, the two js parameters "limitFiles" and "limitSize" are not making any effects in IE. At this stage setting them to "false" would be better than making any confusion.
I believe that the author is working on a solution for this issue. Let's wait.
initialize()(div#demo-status.hide, ul#demo-list, Object)FancyUpload2.js (line 44)
klass()(div#demo-status.hide)mootools...2-core.js (line 1019)
(?)()()fancy_up...ader.html (line 14)
defn()()mootools...2-core.js (line 1847)
[Break on this error] this.parent(options);
I keep getting the above error, any suggestions why this might be occuring?
'data':{var1:document.getElementById('optionGroup').options[document.getElementById('optionGroup').selectedIndex].value},
Its working, BUT, i need to check this value before every upload - coz now it will return 1 only (its default value when page is loaded). Is that possible? If yes, can you post some code? I am godlike in PHP but js-newbie, and I'm beeing crazy about that. Thanks for your time
Did you notice the code in the online example?
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
Here an "event handler" (function(){...}) is passed to listen to "click" event. This event occurs when you click "upload".
If you wanna check some value before upload, try:
$('demo-upload').addEvent('click', function() {
if(condition == true)
swiffy.upload();
return false; });
Replace the "condition==true" by your own condition which should be met before uploading starts.
upload: function(options){
var current = this.options;
options = $extend({data: {var1:document.getElementById('optionGroup').options[document.getElementById('optionGroup').selectedIndex].value}, url: current.url, method: current.method, fieldName: current.fieldName}, options);
if ($type(options.data) == 'element') options.data = $(options.data).toQueryString();
return this.remote('upload', options);
},
Sometimes the easiest way is the best :-) Anyway, thanks a lot :-)
upload: function(e) {
if (e) e.stop();
this.fireEvent('onUpload', this);
this.uploader.send(this.options.url);
},
This is the code on my script. How can I change it to that code you give. I don't understand much javascript. Can you modify it? So I can send additional input data.
I have this image and onclick I will submit it and display the new image and also the image is the uploaded one? Can you give a simple script on how can I possibly do this? and is this possible or not?
Unfortunately I am unable to make it working in Mozilla Firefox 3.0.1 event it is unable to browse images.
can any one help me?
Im trying to attach to the file that is being uploaded 2 input text(title, description) and receive them in php along with the file.
fileComplete: function(file, response) {
alert(response);
//etc
}
In here im making an alert with the response from php. This is what i send back to the js:
$result['info'] = var_export($_POST);
echo json_encode($result);
The output is:
array (
'Filename' => 'ist2_4509299-satin-icons-set-8.jpg',
'Upload' => 'Submit Query',
){"result":"success","info":null}
It doesnt send my inputs. Any suggestions on how can i send some $_POST?
I dont like the idea of sending through:
options = $extend({data: {extra:extra}, url: current.url, method: current.method, fieldName: current.fieldName}, options);
because i want to add extra data to each uploaded file, not at the end of the upload.
Really nice and usefull work!
I have a problem, i secure my ajax with php's session, but when i upload a file, the session disappear, so i can't use my verification.
Do you know why this problem happen, and how to fix it?
When i click "Browse files" IE show me Alert with "Error"
and if you get the error I wrote then you probably have
1) wrong path to swf
2) no flash isntalled
I want to upload images to different galleries, and I have a textbox where I write the name of the gallery. With AJAX I send a request to the server, checking if the gallery exists, or creates a new gallery. The Id of the gallery is returned and I set the value of a hidden textbox to the gallery Id.
I want to send this information with the request to the server, how can I do that?
I've used $("textbox") in the url but that is set when window.onload occurs, and by that time, the gallery Id doesn't exist.
Here is what FireBug returns: code__flash__argumentsToXML is not defined transition()(function(), “browse”)mootools.js (line 266)
I have the same problem onBrowse with IE6 but it works perfect with SAFARI (MAC OS +Windows) IE7, Mozilla (2,3, MAC OS) The moment I click browse the error pops up.
I just had a guy complaining about a "null" being outputted when he clicks on browse (on Safari Mac), but he was the first one complaining about that on Safari MAC, no problems on the ones I tested.
The only problem I can think of is really something with the swf path not working.
We have the paths in the loader and in the Swiff.Uploader.js
But its working great on all browsers except for the IE6 - do you have any solution?
Thanx
http://www.rioleo.org/getting-fancyupload-to-wo...
I found that if the path to the swf must be relative to the website, and the path to the php page must be relative to the script (so if scripts.js & uploader.swf are inside assets, and placer.php is in the root, you must call FancyUpload2 with 'url': '../script.php', 'path': 'assets/Swiff.Uploader.swf')
This is very counter intuitive, and probably browser specific, so if you are having problems with __flash__argumentsToXML you may want to move all the folders to the root.
I used crossdomain a while ago, but as I recall you have to make sure you allow both http://website and http://www.website to get it to work. Also try make all calls to relative instead of absolute paths.
Could that be it?
About the mootools forums, I'm not a dev, but from what I've read:
Mootools has not been able to monetize their site. So it costs them a heck of a lot to run it, but they are not making any of that money back. To cut corners, they decided to do away with the community - the forums, the plugins, basically anything more than the library itself. [And they are pushing off an upgrade to keep their servers from buckling - notice the site's downtime.]
They opened up a completely non-intuitive Google Project page (free), and some people post there for lack of alternative. They have an IRC channel, but it is not for the newbie to Moo or to IRC. And they have a GITHub for those that are willing to learn GIT to post bugs.
Among them all, Digit is one of the biggest proponents of putting the community back together and adding it to the site (our.mootools.net?) Which they do have plans to do someday.
But considering that destroying a programming community is the equivalent of killing the program (Both Ext and JQuery started much later, and in the case of JQ offers less, but have left Moo behind in number of installs, press and plugins, 'cause they have great communities )
I'm sticking with Moo, at least for this week, but if Digit would please push a little more (go Harald go!) perhaps we can have our community back? And switch to Dreamhost or do CoLo and put Google ads up - we will live with it.
@Chris
I have not been having the problem you describe, but it is true that you must put the files into the correct order. The classes build on each other - Swiff using the FX class, so FX must be first. FancyUpload2 uses Swiff. and all of them use Mootools, so they must be in that order (Mootools, FX, Swiff, FU2)
@George
I found that the path to the swf (default - to the same folder) must be relative to the html page in both IE7 and FF3, but I remember reading that other browsers handle the path to a swf differently. (As I recall, inOReilly's AS Hacks he called this an unsolvable problem). The path to the php file should be relative to the swf (I think).
1) Put the crossdomain policy (crossdomain.xml) in the server root folder in my case I am using IIS so the path was c:/inetpub/wwwroot.
2) Make sure your cert. is valid
3) Open IE and go to you site and add the cert. to your trusted sites.
4) Make sure you add the SSL port to your form action.
I hope this helps
I am trying to use this script (which is pretty great by the way, thank you) in my website and I am having trouble with the PHP script called by the form. When I hit the "upload" link, the scripts starts and blocks when the first file reaches 100%.
I have tried to narrow down the problem but can't really find where it's coming from. I just know that if I remove this lines : http://paste.mootools.net/f4ddb9eaa , the script works. But of course it doesn't do what I need it to do, since those lines have a purpose :D
I don't know if the problem really comes from those lines or if it's something else in the script, but maybe you'll see something wrong, or might have an idea for a lead ... I'm pretty stuck right here :/
Thanks in advance for your help.
upload: function(options){
var current = this.options;
options = $extend({data: {var1:document.getElementById('optionGroup').options[document.getElementById('optionGroup').selectedIndex].value}, url: current.url, method: current.method, fieldName: current.fieldName}, options);
if ($type(options.data) == 'element') options.data = $(options.data).toQueryString();
return this.remote('upload', options);
},
Can anyone explain this line by line? Also, what is $extend for? And the this.remote?
the script is working beautiful!
The only thing is: is it possible to upload more than five -images- / -files- at once?
I've already searched the code, but could not find where this restriction is placed.
Can anyone help me?
Thanks!
limitFiles: 5,
you just have to change that ...
(how do you mean, I'm a noob :P)
Am I right in thinking that setting 'fieldName': 'photoupload' means I should use $_FILES['photoupload']['tmp_name']; in my PHP? At the moment looking at the result shown by my script it looks as though nothing is getting sent to the server - I'm confused as to why this works with the fallback form but not the fancyupload method!
First of all, thanks for your project. It does what i expected.
But i have a problem with FIREFOX 2. In fact i modified your script in order to retrieve a thumbmail of the image that was uploaded. It works but i have got caching problems. Frequently the image wich is displayed, from the current upload is the image of a former upload. It's a caching problem.
I saw that you set a nocaching params, but it does'nt prevent this problem.
I would like a no caching that tells that each request thats is retrieved has'nt to be cached, but i just don't arrive to.
Would you have an idea on my problem ?
On my setup: Ubuntu 8.04, Firefox 3.01 clicking on "Browse only Images" or "Browse files" shows an alert box saying "Error". It then does nothing else. I know it used to work fine but something has changed recently and now it is broken.
Adobe does not allow the Browse File Dialog to be opened from a javascript. It can only be opened from a Flash Button. Are you working on a solution.
currently i am working with smarty. I used fancy uploader in the system.it is working when I give it inside a simple smarty file without including any other tasks, but if i include other tasks inside smarty under seperate conditions, it is not working. i fouund the error message that FancyUpload2.js is not defined.
Please give me any suggestions.
You can fire the onError event by setting the header (like header('HTTP/1.1 404 Not Found'); in PHP).
The thing is the error event *will not* send you the json. You will only see the header (eg httpStatus 404). Error event are sent by IOErrorEvent (eg connexion lost) and SecurityErrorEvent (unknown).
To handle errors defined in the json response, you must provide your own onComplete function. You will find the default function in FancyUpload2.js line ~225.
Anyway about posting data, I found this way of doing it :
- In PHP, I insert inputs with type='hidden' and with the right value and name.
- In JS, before creating the fancy object, I get all the name/value pairs :
`var postData = {};
$('form').getElements('input[type=hidden]').each(function(input){
postData[input.get('name')] = input.get('value');
});`
Finally when creating swiffy, I use postData for the data parameter.
God posting with if form is awfull.
Anyway thanks a lot for the fancy upload :)
Anyway about posting data, I found this way of doing it :
- In PHP, I insert inputs with type='hidden' and with the right value and name.
- In JS, before creating the fancy object, I get all the name/value pairs :
`var postData = {};
$('form').getElements('input[type=hidden]').each(function(input){
postData[input.get('name')] = input.get('value');
});`
Finally when creating swiffy, I use postData for the data parameter.
God posting with if form is awfull.
Anyway thanks a lot for the fancy upload :)
*if (!$error && ($size[0] < 25) || ($size[1] < 25))* should be **if (!$error && (($size[0] < 25) || ($size[1] < 25)))**
Sorry for the double post before, my internet access is messy ATM ;-(
http://billige-støvsugerposer.dk/admin/fancyupl...
how do i get around with the extended character?
I checked and found the line "this.parent(options)" inside FancyUpload2.js (method initialize) didn't work
tnx verry much
FileItemFactory factory = new DiskFileItemFactory(4096, null);
ServletFileUpload upload = new ServletFileUpload(factory);
fileItems = upload.parseRequest(request);
Does anyone know what is wrong? Or what can be wrong? I will add that when doing this code with simple jsp it got everything I needed to parse those requests...:/
Please help me somehow :)
"if(big-size)" condition included in action.php is useless unless you want to prevent uploading a file which size is superior to 2MB (as an example) but lower than PHP directives.
I came back yesterday after 1 year or so and realized how great the new version is! Congratulations.
I will post some code suggests about the uploader behavior when I'm done with adapting Fancy Uploads to my needs.
At that very moment I met with that issue: when I "remove" a file from the list, or when I "clear the list" and launch the upload, the "removed" file does still upload!
I can't figure out what happens (or not). How to read logs? And if I don't find out by myself, what do you need to solve the problem?
Thanks a lot.
FancyUpload can not work well in IE6( windows xp with sp1 )
securityError
Error #2038
when i try to upload bigger files like rar files like 200 mb
works great, but one weird thing: logfile success, file gets uploaded, but i get the "file-failed"-css class for the file. in php, the success-case is taken.
strange. im working with codeigniter 1.6.3 and a separate upload controller.
but swiff.base can be fairly easily modified to accomodate creating an embed tag.
if(navigator.oscpu && navigator.userAgent.match("rv:1\.9")){
// do stuff here
}
When trying to uplaod an mp3 file, i modded the script to allow it, but the overall progress bar overtakes the file bar and it says infinity MB???
It never actually uploads.
Help
I love this gadget!
But I still want to add more parameters that I want to send to script.php!
How to do that exactly? Or where can I find how to do this?
Thanks!
Bob
here is my example
var MyFancyUpload = new Class({
Extends: FancyUpload2,
onAllComplete: function(current) {
this.parent(current);
// No alert, its callback from flash, don't make crazy things here because Flash waits for the return(???)
//this is where we can do ajax calls to update the page -or reset the extra form fields etc
updatepage();
console.log('All Done!');
}
});
call an instance of your extended class
window.addEvent('load', function() {
var swiffy = new MyFancyUpload($('filup-status'), $('filup-list'), {
'url': $('form-filup').action,
'data':$('form-extra'),
'fieldName': 'fileupload',
'limitFiles': 1, //single file only
'path': 'js/Swiff.Uploader.swf',
'onLoad': function() {
$('filup-status').removeClass('hide');
$('filup-fallback').destroy();
}
});
Make a form containing your required form fields for additional data -in my example the form is called 'form-extra' .The fields in this form will be posted to your upload php file ( data':$('form-extra'),)
in my example the extended class i made allows me to to update the page after an upload because of the extra method onAllComplete: with which i call a custom function updatepage() in my example.
hope this makes sense -
the form for additional data has id=‘form-extra’
I am having a very unique problem with File Uploading in the home computer which is connected through the wireless router.
When I try to upload files on Gmail, Hotmail(Takes a long time) and Yahoo(Takes a long time), the files upload and can be attached to emails. However, when i try using our Order Center or GDS upload feature, we are running into issues as seen in the attached image.
However, when i am connecting directly through a cable(Not wireless device), file is uploading OK from Order Center or GDS. The same works when I use the Tata Indicom WIFI USB datacard.
Obviously, Gmail is doing some magic and file uploads are very fast. Hotmail and Yahoo also are doing it but very inefficient and slow.
This is a unique issue that I am facing with only home wireless router. The office router does not have this problem.
Any idea what the issue could be and how it can be resolved. One way to approach it, is reconfigure the wireless router at home. Maybe we used some option there that is causing the problem. However, that is not going to solve our issue. But the question is how is Google able to circumvent this issue and seemlessly upload files.
I am having a very unique problem with File Uploading in the computer which is connected through the wireless router.
When I try to upload files on Gmail, Hotmail(Takes a long time) and Yahoo(Takes a long time), the files upload and can be attached to emails. However, when i try using Fancy Upload, we are running into issues.
Obviously, Gmail is doing some magic and file uploads are very fast. Hotmail and Yahoo also are doing it but very inefficient and slow.
This is a unique issue that I am facing with only wireless router.
Any idea what the issue could be and how it can be resolved. One way to approach it, is reconfigure the wireless router. Maybe some option is there in fancy upload that is causing the problem. But the question is how is Google able to circumvent this issue and seemlessly upload files.
First off FancyUpload is the slickest file upload enhancement I have come across. Kudos for a job well done.
I am having an issue with onBeforeOpen which I could use some help with. I am creating text inputs for each file that is being uploaded and altering options.data to send the appropriate input with the file. If I alter the onBeforeOpen in your fancyUpload2 class then I can get it work in Firefox and Safari. However IE does not see the update to the data.options. If I use the method you have suggested with 'onBeforeOpen':... it does not work in any browser. I put a stripped down sample at http://diamond.designlab.net/fancy. Any suggestions?
Thanks for your time!
sorry for my simple question, but I have searched and not found the solution.
Wher I have to write the extensions allowed for upload
Eg I want to be able to upload jpeg, pdf, zip and doc
Please, to what files and row I have to write this .
Regards
options: {
url: false,
swf: 'Swiff.Uploader.swf',
multiple: true,
queued: true,
types: {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png' ,'Documents(*.doc,*.txt,*.pdf,*.xls)':'*.doc;*.txt;*.pdf;*.xls','Archives (*.zip,*.rar)':'*.zip;*.rar)','Audio (*.mp3,*.wav)':'*.mp3;*.wav)','Supported Filetypes':'*.jpg; *.jpeg; *.gif; *.png;*.doc;*.txt;*.pdf;*.xls;*.zip;*.rar;*.mp3;*.wav;' },
limitSize: false,
limitFiles: false,
createReplacement: null,
instantStart: false,
allowDuplicates: false,
optionFxDuration: 500,
container: null,
queueList: 'photoupload-queue',
onComplete: Class.empty,
onError: Class.empty,
onCancel: Class.empty,
onAllComplete: Class.empty
},
example of filetypes options in fancyupload.js
options: {
url: false,
swf: 'Swiff.Uploader.swf',
multiple: true,
queued: true,
types: {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png' ,'Documents(*.doc,*.txt,*.pdf,*.xls)':'*.doc;*.txt;*.pdf;*.xls','Archives (*.zip,*.rar)':'*.zip;*.rar)','Audio (*.mp3,*.wav)':'*.mp3;*.wav)','Supported Filetypes':'*.jpg; *.jpeg; *.gif; *.png;*.doc;*.txt;*.pdf;*.xls;*.zip;*.rar;*.mp3;*.wav;' },
limitSize: false,
limitFiles: false,
createReplacement: null,
instantStart: false,
allowDuplicates: false,
optionFxDuration: 500,
container: null,
queueList: 'photoupload-queue',
onComplete: Class.empty,
onError: Class.empty,
onCancel: Class.empty,
onAllComplete: Class.empty
},
@disqus : your comment system sucks
-i hope Harald can find time to set up a better one some day
Read the notes Harald provided,read the code,read the comments -all the answers are here if anybody is having difficulty implementing the highly useful FancyUpload.
in fancy upload 2 you would do something like this when you create an instance of fancyupload2 for your uploader page html
$('filup-browse-all').addEvent('click', function() {
swiffy.browse({'Supported Filetypes':'*.doc;*.txt;*.pdf;*.xls;*.mp3;*.jpg; *.jpeg; *.gif; *.png'});
return false;
});
$('filup-browse-files').addEvent('click', function() {
/swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
swiffy.browse({'Audio (*.mp3)':'*.mp3' });
return false;
});
$('filup-browse-files').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
swiffy.browse({'Audio (*.mp3)':'*.mp3' });
return false;
});
Is is obvious that if the JSON response string contains escaped double quotes, FancyUpload refuses to render the it. onComplete() and fileComplete() is totally bypassed in that case
This bug can be tested with FancyUpload 2.0beta4
Is there any way to get raw Ajax response in onAllComplete()?
"In previous versions of the Flash Player, you could programmatically call the FileReference.browse() method to open a file browser dialog window which enabled users to locate a file on their system so that it could be uploaded to a server. Many existing applications use this feature including various WordPress and Flickr uploaders. In Flash Player 10 you can no longer spawn this dialog window programmatically and it must be initiated by a user click. The attempt to launch the dialog with code will throw a security exception, effectively breaking these existing applications."
The same to FancyUpload
this is fancyuplaod v1
element: new Element('li').setHTML('<span class="queue-file">'+ name +'</span><span class="queue-size" title="'+ size +' byte">~'+ Math.ceil(size / 1000) +' KB</span><input name="title" type="text" id="title" maxlength=30 />').injectInside(this.queue)
});
this is fancyuplaod v2
(this.options.fileCreate || this.fileCreate).call(this, file);
this.files.push(file);
how to add <input name="title" type="text" id="title" maxlength=30 />
thanks a lot
...
fileUpload: bildupload,
...
function bildupload(file,options){
options.url = this.options.url+'&image_id='+image_id;
return options;
};
Should I be doing this a better or smarter way... for instance appending the extra arguments to the url, rather than the options.data object?
Thanks for your help, if you can let me know where i can change that.
Thanks a lot for your help
Im pretty sure that label should be used like this
<label for="fieldname">data</label>
<index id="fieldname>
as opposed to
<label for="fieldname">data
<index id="fieldname>
</label>
which is what you have ?
Thanks.
I f you are using the digitaralds PHP script you could slot it into the if clause where you see the "success" result.
N.
I found an error in your demo CSS
in
#demo-list li.file .file-info
you have
"clear" with no parameter
thats invalid css
N.
should it be
clear: left; ?
clear: right; ?
or
what ?
N.
I modified FancyUpload2 a little by adding lang variable, which allowed me to translate the file easier (basically all language strings are in one place):
`
var FancyUpload2 = new Class({
Extends: Swiff.Uploader,
options: {
/* ........ */
},
// for translations --KG
lang:{
file_progress: 'File Progress',
upload_time1: 'Upload with ',
upload_time2: '/s. Time left: ~',
upload_complete:'Upload complete!',
overall_progress: 'Overall Progress',
no_flash: '<span style="color:red;">Oops, perhaps there is no Flash plugin installed in your browser ...</span>'
},
/* ....... */
`
then I could refer to them as eg. this.lang.file_progress, etc.
FancyUpload 1.0 and 2.0 don't work with Flash Player 10. Any solutions?
Thanks!!
I am using this multiple file uploader for as a standalone application to learn how to use it. I want to do redirect to a different page after the files have have been uploaded. At the same time if none of the files get uploaded I want to remain in the same page. I am not able do this.
I need some heads up from you guys.
Thanks,
Mohan
thanks for your work, but I have a question please.
I want to be able to upload txt and pdf documents.
I followed your example (PHP and fancyupload2), but the script not upload .txt or .pdf;
upload only images.
I have to modify the SWF files to be able to upload .txt and .pdf ?
I dont have CS3 Flash to see or modify the SWF.
ps. thanks to Sim who tried to help me, but his examples do not work
$('demo-browse-all').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-browse-images').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png', 'Documents (*.txt, *.pdf)': '*.txt; *.pdf'});
return false;
});
swiffy.browse({'Supported Filetypes':'*.doc;*.txt;*.pdf;*.xls;*.mp3;*.jpg; *.jpeg; *.gif; *.png'});
return false;
});
$('filup-browse-files').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png',‘Documents (.txt, .pdf)’: ‘.txt; *.pdf’});
return false;
});
that works for me.
try
$('filup-browse-all').addEvent('click', function() {
swiffy.browse({'All Files':'*.*'});
return false;
});
that will allow you to browse any sort of file
this is your code
$(‘filup-browse-all’).addEvent(‘click’, function() { swiffy.browse({‘Supported Filetypes’:’.doc;.txt;.pdf;.xls;.mp3;.jpg; *.jpeg; *.gif; *.png’}); return false; });
Can you explain me please why in some extension toy put the asterisk (*) like *.gif .. and in some no .. like .pdf ... or .doc
Your code for me not work.
swiffy.browse({'Supported Filetypes':'*.jpg; *.jpeg; *.gif;*.png;*.doc;*.txt;*.pdf;*.xls;*.zip;*.rar;*.mp3;*.wav;' });
the text before the : is a description the *.ext part is the file extension filter for the browser widget
swiffy.browse({Images (jpg, jpeg,gif,png)': '*.jpg; *.jpeg; *.gif; *.png' ,'Documents( doc, txt, pdf, xls)':'*.doc;*.txt;*.pdf;*.xls','Archives (zip,rar)':'*.zip;*.rar','Audio (mp3,wav)':'*.mp3;*.wav' });
I used your code, copy and paste and I receive this error when try to upload pdf
"Please upload only images, no other files are supported."
WHY ?
hint:check your php script that you are uploading files to.
I finded by myself the solution
I have to modify the php file script.php and not only this code
$('filup-browse-files').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png',‘Documents (.txt, .pdf)’: ‘.txt; *.pdf’});
return false;
});
So I have a hint for you:
the next time you try to help someone, please give complete help, and not riddle, if you know the solution.
Thanks for your time and yours answers.
i might not bother helping in future
>
>FancyUpload 1.0 and 2.0 don’t work with Flash >Player 10. Any solutions?
>
>Thanks!!
It's a Flash Player 10 issue. It's because the browse button is javascript based and the stupid guys from Flash think it is a security issue when the browse button is triggered from a javascript.
but I get always
ioError
Error #2049
What do I wrong?
you can see it in action @
http://sinaiaforever.ro/upload/
log file :
http://sinaiaforever.ro/upload/script.log
Thanks
very thanks
FF2/3, O9.5 and S3 work just fine.
Question 1: In the file: fancyupload2.js change the parametrer: limitFiles: 5, to 10.
Question 2: In the php file, change next
if (!is_uploaded_file($file) || ($_FILES['photoupload']['size'] > HERE * 1024 * 1024) )
{
$error = 'Please upload only files smaller than 2Mb!';
}
For your range multiplicator.
Bye!
<script type="text/javascript" src="scSwiff.Uploader.js"></script>
<script type="text/javascript" src="Fx.ProgressBar.js"></script
<script type="text/javascript" src="FancyUpload2.js"></script>
<script type=”text/javascript” src=”Swiff.Uploader.js”></script>
Thanks,
Thomas
Thanks
Ik got this error when I upload an image:
Missing file or internal error!
This is the url of my demo: http://fredrotgansmedia.nl/pic_test.php .
But as you can see, it doesn't work.
This is my php-code:
[code]<?php
$result = array();
if (isset($_FILES['photoupload']) )
{
$file = $_FILES['photoupload']['tmp_name'];
$error = false;
$size = false;
if (!is_uploaded_file($file) || ($_FILES['photoupload']['size'] > 2 * 1024 * 1024) )
{
$error = 'Please upload only files smaller than 2Mb!';
}
if (!$error && !($size = @getimagesize($file) ) )
{
$error = 'Please upload only images, no other files are supported.';
}
if (!$error && !in_array($size[2], array(1, 2, 3, 7, 8) ) )
{
$error = 'Please upload only images of type JPEG.';
}
if (!$error && ($size[0] < 25) || ($size[1] < 25))
{
$error = 'Please upload an image bigger than 25px.';
}
$addr = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$log = fopen('script.log', 'a');
fputs($log, ($error ? 'FAILED' : 'SUCCESS') . ' - ' . preg_replace('/^[^.]+/', '***', $addr) . ": {$_FILES['photoupload']['name']} - {$_FILES['photoupload']['size']} byte\n" );
fclose($log);
if ($error)
{
$result['result'] = 'failed';
$result['error'] = $error;
}
else
{
$result['result'] = 'success';
$result['size'] = "Uploaded an image ({$size['mime']}) with {$size[0]}px/{$size[1]}px.";
}
}
else
{
$result['result'] = 'error';
$result['error'] = 'Missing file or internal error!';
}
if (!headers_sent() )
{
header('Content-type: application/json');
}
echo json_encode($result);
?>[/code]
http://fredrotgansmedia.nl/uploader2/test.php
The output you see is coming from this code:
echo '<pre>' . print_r($result, true) . print_r($_FILES, true) . '</pre>';
As you can see, he just doesn't get the $_FILES or something, does anybody know the answer to this?
This is being called at the beginning of a file browse. The parameters appear to be setting up correctly.
else {
move_uploaded_file($_FILES['photoupload']['tmp_name'], "uploadedfiles/".$_FILES['photoupload']['name']);
chmod("uploadedfiles/".$_FILES['photoupload']['name'], 0777);
}
Thanks in advance.
http://www.rioleo.org/getting-fancyupload-to-wo...
I'm using a fresh install of Joomla 1.5.7 with the flash upload that came boundled with it. When I try to upload I get a 404-error, and I didn't know what to do with the info provided above on that error.
Uploading using non flash methods works. Any ideas?
Thanks.
I'm trying to pass a $userID variable along with it so users upload to their own folders, but I can't find where to pass the variable to script.php. Thanks
Does anyone know where the request actually gets sent to script.php?
I’m trying to pass a $userID variable along with it so users upload to their own folders, but I can’t find where to pass the variable to script.php. Thanks
<input type="hidden" name="userID" value="12345">
ADD one line to the "JavaScript & MooTools" page script:
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': '../../source/Swiff.Uploader.swf',
***** 'data': $('form-demo'), *****this line here without the **** and comments. make sure the form name is correct
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
In the "PHP Script" after "$size = false;" ADD the following line:
$userID = $_POST['userID'];
You can then manipulate the $userID variable throughout your script just like any other PHP variable.
I couldn't figure out why the image type is passed to the script as an application/octet type, so I added a check. I only allow jpg and gif uploads, and here is how I check:
{ if(ereg("gif",$size['mime'])){
$extension = ".gif";
}//if
elseif(ereg("jpeg",$size['mime'])){
$extension = ".jpeg";
}//elseif
}
An upload is provided in five parts in PHP (see http://www.php.net/manual/en/features.file-uplo...). However, these references don't necessarily work with Swiffy. Instead of being able to use "$_FILES['userfile']['type'] ", you can use "$size['mime']" to get the type. Then I just use the variable $extension to pass the type through my script.
if(ereg(“gif”,$size[‘mime’])){
$extension = “.gif”;
}//if
elseif(ereg(“jpeg”,$size[‘mime’])){
$extension = “.jpeg”;
}//elseif
I have been wondering if someone could help me how to upload a huge sql database to phpMyadmin. My problem is everytime I upload, it takes more time than it is allowed. Result...only a portion of db is uploaded. My site is down since longtime.
www.goldclix.org
Only i big problem for me:
I just cant get it to work with uploading files over 2mb in size.
i changed the code a bit to remove the limit, but is doesnt seems to help.
Can you help?
if (!is_uploaded_file($file) || ($_FILES['photoupload']['size'] > 2 * 1024 * 1024) )
Mine is set to 6 * 1024 * 1024.
You will then have to check with your web host to make sure that your site's PHP settings allow greater than 2MB files to be uploaded. I believe I had mine changed to 10MB.
upload_max_filesize = 16M
for example
if you don't have access to the php.ini file check the documentation on your hosting provider and see if you could make php.ini files per directory and put this in that file.
It would be also good idea to set max_input_time to
max_input_time = 120
or even more, that's your choise , it depends on the upload speed you have :)
set post_max_size to 16M
is also good idea i think , but i'm not sure.
I would like to know if it's possible to add more extensions file for upload as .pdf, .doc , .eps or else ?
could you tell me how to do please ?
thanks for all.
Je viens d'ajouter ton script sur mon site, je les modifier pas mal, pour l'ajouter a un script, etc... donc comme ce sera servit par pas mal de monde, j'ai remplacer " FancyUpload " par " FancyUpload car sa ne vient pas de moi, je l'est juste modifier donc je voulais que ce soit connu, en plus il est trop bien ton script :).
I was asking how can automatically create a new folder for each new upload ... for example in md5 or SH1 or the date.
<?php
$target = basename( $_FILES['photoupload']['name']);
$md5 = md5_file($_FILES['photoupload']['tmp_name']);
if(!file_exists($md5)) mkdir($md5);
if(move_uploaded_file($_FILES['photoupload']['tmp_name'], $md5 . "/" . $target))
echo "http://www.example.com/uploaded/$md5/".rawurlencode($target);
else
echo "Sorry, there was a problem uploading your file.";
?>
Any ideas on what might be causing this generic "Error" alert to popup for WXP IE6?
The problem comes from Adobe. The droped support to call File Browser from Javascript. The guys have to rewrite there code in order to call the File Browse from Flash directly with a button.
It seems that the author is not working on project at the moment.
See swfupload.org for more details on the problem. Swfupload is a similar upload plugin and they are one step further with the solution (see the code update for fixed version)
It sucks
Here is the offical statement and the fix!!!!!!
http://digitarald.de/journal/54706744/fancyuplo...
e.g. process.php?a=0&b=4&c=fish
Also, just tried your latest version committed on github (088ff722f06672dc4b7105b479d9aada2afcb46e) on my implementation,same result -- fallback behavior.
I have tried swfupload in the past and have not had any luck with this.
Ah, sad is that Adobe movement was good idea, but now we suffer :]
obj.CallFunction is not a function
http://digitarald.de/js/mootools-trunk.js
Line 2914
remote()(function(), "register")mootools-trunk.js (line 2914)
remote()()mootools-trunk.js (line 2906)
load()()Swiff.Uploader.js (line 60)
returns()()mootools-trunk.js (line 567)
[Break on this error] var rs = obj.CallFunction('<invoke name...mentsToXML(arguments, 2) + '</invoke>');
I also get the __flash__argumentsToXML is not defined error.
Browser: FF 2.0.0.17
Flash: 9 (Build 103)
Error:
__flash__argumentsToXML is not defined (mootools-1.2-core.js (Line 2950))
Can I control the start of each file upload? By default all the files start to upload automatically but, in some cases, I need to do something before to start the next file upload in the quenue.
Thanks for this tool
I will invite you to dinner (with a donation :), this project rocks!
I'm still using version 1 in my application because i can't just jet upgrade to mootools 1.2 because my huge web app is build on 1.1 and is not compatible with 1.2.
Something strange happened, at one page is use fancyupload while uploading de $_POST does contain all my hidden form field. On another page the DOM is identical, JS is identical but it won't have the hidden form fields in the $_POST.
Could you give me a hint what might be wrong?
Thanks
I had once the 1.0 version working, but now with the new version, i'm trying to setting it up.
I'm having a problem :S
looks like that js doesnt loads.. doesnt allow me to click in the link to upload the files... progression bars are 50% 'loaded'...
http://www.digitalwhores.net/qpu.png
Tnk u all
Thanks!
What use version 1.0 with Flash 10?
There was only a correction to version 2.0, but I prefer to 1.0
Could you just check that out?
`http://www.e-tn.de/sandbox/temp/test.php5`
My mistake or eventually a buggy version?
thefundy [at] gmail.com
Thank you.
Andrew
Very nice script.
how could I rename the uploaded file (for example, i want to add DATE+TIME in the file name)
Thanks in advance
"it still show ‘All Files’ although i already tick the “Image only”. however, the firefox is running correctly."
We've been using the fancy upload across various client sites and for some reason after updating the latest versions of Flash and Firefox it stopped working. It looks like happens as well in http://digitarald.de/project/fancyupload/2-0/sh...
I am using Firefox 3.0.3 and the latest Flash plugin (10). I am not sure what is causing the problem but basically it pops-up a JS alert with an Error once you try to select the images to upload.
Let me know if you have any idea of what is going on.
It's the only things that's still not works... everything goes good now!
Thanks...
I Have a problem with the queue. When I select more then one Photo to upload, the first Item is uploaded correctly, but then, the progress stops.
I guess it the onComplete function is not triggered?
how can I check/solve it?
best regards,
elmo
`code`
Browse started.
Added 2 files, now we have (108461 bytes).
Initialize upload for "woods11.jpg".
Upload started.
Starting upload "woods11.jpg".
`code`
Write please detail how you solved the problem?
Thanks.
Tras probar el script tan solo puedo decir que es GENIAL! Pero me asalta una duda, ¿Se puede limitar mediante una variable el número máximo de archivos a subir?
Saludos!
I have a big problem...
firebug result 1 error : __flash__argumentsToXML is not defined
I use : mootools 1.2.1 - Swiff.Uploader 1.2 - Fx.ProgressBar 1.0 - FancyUpload 2.1
I test with older version but no result...
Anyone have an idea ?
Thanx
Andrew
I tried even the example on this page and it doesn't work. So if it happened like this to someone else please tell me, I don't know if the problem is mine or general. Thank you
1. Swiff.Uploader.js
2. Fx.ProgressBar.js
3. FancyUpload2.js
http://www.markledford.com/blog/2008/09/01/myst...
I've seen it only happens in firefox and with flash 9 players. in some forums, they said it was a problem with "trace" in actionscript, and that the swf had to be compiled disbling them.
Any way the downloadable version may have them disabled?
I can't make every and each user update flash 10.
so im screwed...
It limits files fine in Firefox2 and 3.
I have a program uploading pictures written in java (no php) using FancyUpload v 1.0. It works fine, but not for flash 10, so I decide to implement FancyUpload v 2.0.
I changed all needed javascripts, MooTools. Browsing files works fine, when I click button "upload files" progress bar goes to 100% and nothing happens... On the server side all works ok: file (only the first uploaded) is saved on the disk, no errors. Firebug also do not show any errors. The last log on the console of Firebug is: "upload started". It looks like, the fileComplete event is never called, so maybe something is wrong with the response of server...
It is strange, because the java code worked with FancyUpload v1 (I didn't chane it). I have no idea what to do with this bug next :/
Very cool Flash/Javascript utility. Well done.
A bug you may wish to look into:
If you set a file size limit, using limitSize: files that are selected above the limit are omitted from the List, but they are still posted to the server for processing.
Another query: The swiffy.options.typeFilter doesn't work in Internet Explorer. It does in FireFox? Any ideas on this.
Regards
Age gould.
I want to display a message for users to prevent them from uploading duplicate records.if anyone have a clue how this can be done please reply
I tested it on another PC's and some of them works fine, some others it doesn't works. It show me the pop up "Error" message.
Whats wrong??
All security settings in my IE7 are unchecked !!.. Help me!
Please help!
Antoine
So, i'm using now the fixed script. In IE7 works fine, but in Firefox i can't click the browse button. It doesn't work. When i look the source code i can see there is a div element over the text. If i edit that html code with firebug and remove that div i can click the Browse button, but firefox chashes.
the most wired is that i can use perfectly the example in this site. But when i test the script in my site it doesn't work.
You can see the script in www.materiaprimadesign.com/clientes/CostaCrucer...
How can I fixed the flash 10 problem using version 1 of fancyupload.
Please do not answer saying "upgrade to version 2" :)
Please help
The version 2 action script can still be used to launch the file browser and handle file selections,etc...
it acutally doesn't need moo tools NOR swiff.
I've been using it with jQuery actually, you just have to write your own JS handlers in response to the flash events, which the AS provides. The only thin you need to add to the AS to fix the recent Flash 10 issue, is to launch the fileRef browse method from a mouse click event on a flash asset on the screen, instead of from Javascript.
kind regards,
i think that updating the swf will solve the issue, but .fla is not distributed
But i have the same problem with Flash 10, i am unable to upload, i have an error message :(
Thanks for the work on this but I get this error returned when inspecting code output in safari:
Can't find variable: __flash__argumentsToXML
http://mmuller.site40.net/uploader/JScripts/moo... (line 2950)
Could someone take a look at http://mmuller.site40.net/uploader/index.php
and let me know why this isn't working ??
Thanks in advance
I've configured updated Flash10 Fancyupload locally.
Sure enough, session Id is lost en route to the server, BUT only in Firefox (v.2).
I am trying to figure out an alternative to sending PHPSESSID over to the server - a) security concern; b) my server has session.use_trans_sid disabled.
Is there no way to send an additional cookie with the upload request?
Thanks,
Temuri
You might be aware of this already - FF3 Adblock extension breaks Fancyupload. Is there a fix/workaround (apart from uninstalling Adblock) ?
Thanks!
Anyone have an idea to resolve this problem?!
Thanks!
What do u mean with Reinstall correct Flash Version?
I have downloaded the swf file and the alert with the word Error persists!
In Firefox 3 and Google Chrome appears this error message, in Internet Explorer 7 doesn't
How can I solve this problem?
Suggestion: A little description instead of only "Error" message could be applied.
I have the same problem: works in IE but get the "Error" pop-up in Chrome and FF.
Sorry for "Japanese-English."
But it don't work with IE6 on XP.
Progress bar "current-file" hasn't changed like "overall-files."
on Safari & FF3 both of progress bar has changed.
window.getScroll is not a function
initialize()(Object)Swiff.Uploader.js (行 62)
parent()()mootools...2-core.js (行 1082)
initialize()(div#demo-status.hide, ul#demo-list, Object)FancyUpload2.js (行 46)
klass()()mootools...2-core.js (行 1019)
(?)()()idex.html# (行 35)
defn()()mootools...2-core.js (行 1847)
[Break on this error] var scroll = window.getScroll();
remote()(function(), "browse")mootools...ore-nc.js (行 2950)
remote()()mootools...ore-nc.js (行 2942)
browse()(undefined)Swiff.Uploader.js (行 100)
parent()()mootools...ore-nc.js (行 1082)
browse()(undefined)FancyUpload2.js (行 141)
(?)()()idex.html# (行 46)
defn()(Object $extended=true event=Event click type=click)mootools...ore-nc.js (行 1854)
[Break on this error] var rs = obj.CallFunction('<invoke name...mentsToXML(arguments, 2) + '</invoke>');
I'm using this amazing uploader, and I would like to know how could I have a type image/jpeg instead of application/octet-stream for the PHP $_FILES variable when it's a JPG image.
Because with a type application/octet-stream the PHP upload class I'm using after isn't working to resize etc.
I've got this with FancyUpload: array(5) { ["name"]=> string(12) "DSC_0022.JPG" ["type"]=> string(24) "application/octet-stream" ["tmp_name"]=> string(14) "/tmp/phpAYNC4o" ["error"]=> int(0) ["size"]=> int(157158) }
And I would like this:
array(5) { ["name"]=> string(12) "DSC_0022.JPG" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(14) "/tmp/phpduIOzI" ["error"]=> int(0) ["size"]=> int(157158) }
How can I do ? Thanks a lot for your script and future answer !
I will appreciate any suggestions. But editing about:config is not an option.
Thanks.
Thanks.
>
>I get an “where is the debugger or host >application running” flash message when >using your “fixed” version.
>
>http://www.markledford.com/blog/2008/09/01/myst…
Yeees!!! Me too. I’ve seen it only happens in firefox and with flash 9 players. in some forums, they said it was a problem with “trace” in actionscript, and that the swf had to be compiled disbling them. Any way the downloadable version may have them disabled? I can’t make every and each user update flash 10.
Many Thanks for your Fancy Upload. I've done some tests with some real upload files and i'm impresed to see the group of files runing in the same time to the server with the upload progression bars display. Great job and thanks again from France.
When a file is uploaded to the server the encode is UTF-8 by default.. If the file name contains some é or è, the name changes for UTF-8 encode types. So how to change it for ISO ? I've put the header for a content type in ISO in the php script but it doesn't work .... Any idea ?
I have copied the example but the problem persists.
thanks
So is there a way to browse directly a particular type of file instead to tick the checkbox?
Regards
The only difference with this showcase, is that on my page the upload form appears in a floating div (popup) loaded through ajax.
It has to be something with the css and the style of the target overlay, but I still don't get it :(
Also I am not sure this is the appropriate page to discuss about it :-s
Thanks anyway
how about localized versions for the FancyUpload2 class? May be realized as external language files?
For example "FancyUpload2.[lang].js"
Let me know!
bye
Were you able to get FancyUpload working with Flash 10 in both Chrome and FF? If so, can you share what you did to get them working?
yes now it works better than this morning! The problem was the JS and the Flash plugin not updated.
SOLUTION:
- Update the JS from http://github.com/digitarald/digitarald-fancyup...
- Uninstall all Flash players plugins installed on your pc
- Download the new Swiff.Uploader.swf from the above mentioned site too
- Re-Install the Flash Plugin from this link http://get.adobe.com/it/flashplayer/
Regards
any suggestion is appreciated
thanks
I need to upload some large videos in avi format. If you try to upload a avi file also the version on this site doesn't work.
Let me know!
Regards
http://www.rioleo.org/getting-fancyupload-to-wo...
look at http://imagebin.org/31032
All those people who have a new version installed of the flash plugin see this alert box.
yes, I have checked the php.ini and I have already set the upload limit to 20MB.
thanks
However, everything works wonderfully in IE.
Currently is it only posting "photoupload".
Is there a way whereby i can post "name", "email" together in the same form? thks!
Just noticed the type filter doesn't appear to work in IE (6+), just always allows upload of all files *.* See the demo on this page.
Is this a known issue or is there a work-around.
Thanks
P.s. I long for the day when we don't have to support silly IE!
You can download a small sample app all put together for you.
D/L it - modify the config file as needed and you should be good to go.
http://www.taketwodevelopment.com/fancyupload/
Anyways - hope it helps.
-Rob
Does the link work for you with Flash 10 installed in Chrome or FF?
Didnt try flash 10 yet
Thanks.
Firefox is clear installation.
Firefox is clear installation.
Does anyone have a clue why my sessions are getting destroyed and am getting logged out soon after the files have been uploaded using FancyUpload.I am having this problem only in IE 7.0 while in Firefox its working fine.Waiting for your response.
is there a fix ?
I would like to know what is the modification that you have done for fancyupload 2 to fix it under flash 10.
thanks.
"Broken in Flash 10?
Fresh preview release available, especially for Flash 10!" @ showcase demo
Click on it...
If you remove your new flash player and install e.g. a 9.0 it gonna work...
then reinstall flash player 10 and it gonna show 'Error'
http://www.adobe.com/support/flashplayer/downlo...
I have an issue - is more a visual one
It takes some time until the flash is loaded so i have time to click on the browse button
i think you should disable the button until you know if flash 10 exists or not
I tried the fix for flash 10. It worked ok but the button breaks when the page content disposition changes (ex: via ajax) as the flash object remains at the same place due to the absolut positioning.
I've made wrap for this (with an ugly code, but working) and I can send it to you if you want; I'm sure you can take the idea and do it better.
Thank you again for your great efforts
please can you fix defining filetypes feature in IE7. It doesn't work with changes for Flash Player 10.
But when the upload button is pressed first file uploads and then nothing happens.
I used Firebug tool to search for the error. It's looks like the 'onComplete' event is never called after uploading the first picture.
Any idea how to fix that error?
if (ret !== true) {
this.log('Upload in progress or nothing to upload.');
if (ret) alert(ret);
} else {
this.log('Upload started.');
this.status.addClass('file-uploading');
this.overallProgress.set(0);
}
ret equals false, therefore an error alert appears. But it just says "error" and nothing else.
Any idea??
I fix this and now it works :)
I can't fix it ;/
I've tried to implement the fix published for v2.0 into v1.0, but I can't find the right place to include the target for the "Browse"-button.
__flash__argumentsToXML is not defined
Does anyone know why? I have no idea, because it's the mootools core
One question, the only issue I'm having is how to detect when no files have been chosen for upload. I still need to fire an onComplete() function but am unable to determine whether a file is uploading or no file was chosen at all.
The point here is my file upload is optional so I need to be able to fire an event to say "file uploading is done..." whether the user actually uploaded a file or not.
Thanks!!
It looks as though the ajax isnt working as I can see the "Upload Photos" label and the browse button??? Any ideas why???
$('demo-browse-images').addEvent('click', function() {
swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'});
return false;
});
i am using flash 10
/**
* Doesn't work anymore with Flash 10: swiffy.browse();
* FancyUpload moves the Flash movie as overlay over the link.
* (see opeion "target" above)
*/
did you see it ?!
Firefox 3.0.4
can anyone help me asap. >>>>
I've been used this uploader on my customer's website how manage his client's images files...
the script run fine on my machine on localhost, but does'nt work and the real domain... I've used subdomain for the admin panel and used it... but when my customer trying to upload an error message shown on the uploader screen which is ( httpStatus 503 )......
please tell me what is this. I've tryied to solve that issue. but failed.
Note: I've passing 2 var from the from to the upload.php file where some mysql data are retrived...
then create 3 folder under folder with the retrived value : company name > date > project name > then upload the file...
please help me ..........
waiting for good response.
The uploader doesnt work with flash player 10. It works 100% in flash player 9. Any chance of getting a fix soon?
onLoad: function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
},
callBacks: {
onComplete: function() {
this.log('Uploaderasd redasdasdady!');
},
onAllComplete: function() {
this.log('Uploaderasd rasdq12ady!');
},
},
I'm wondering if there is a way to only allow uploading of a single file (but I'm not sure how to search the discussions).
In Firefox it goes as expected, but Internet Explorer 7 allows any type of file to be picked.
When will there be an update to fix this?
Yes I did and it worked perfectly until I installed this new version 10.0.12 (which is newer than the 10.0.10 you've installed).
In Firefox upload works good but in IE the browse button doesn't show. When I paste the adress of the popup into browser (IE) it also work, so the problem is popup in IE.
Maybe you have a solution for this problem?
Again, IE is bothering us...
Does anyone know if it is a auto-update, en if yes, which one?
Harold, do you know of this problem en is there a possable solution?
I have created a simple test script, with no changes from your sample code. In ie6/7, when an option is set like limitFiles: 5, but you select 6, the javascript on the client will only show 5 files, however it seems 6 will get submitted/registered with the swf. When you watch your log, or create a log entry to the php script you're hitting, you will notice that only in ie6/ie7, there are 6 hits coming through despite the fact the client side is only showing 5 files.
Is there an email I can reach you at to send you the exact scripts so you can test locally? Or is this is a noted issue and a possible work around available? I'm working on a WAMP stack, php 5.x, xhtml declaration.
Thanks.
Then go with ie7, select 6 of them. Although the UI will show only 5 files being uploaded, after you upload them and check your log, you'll notice all 6 have been uploaded. Additionally, in FF when you select the 6, the overall file size will add up properly for those 5 files, where as for ie7, it'll show the cumulative size for the 6 files, even though only 5 are being shown in the queue.
Let me know if I can be of any help, or a work around/fix.
Thanks.
Oliver
I've looked through the fla, but can't seem to find anything in there. I'm not an AS guy though; I'll keep checking and see if I can provide any more feedback to you to help debug this issue.
It seems that the issue lies with the onSelect method. For some reason in ie, the return value is not being respected when it gets called. The swf registers the file to be posted regardless of whether it returns true or not. FF does not have this issue. At first I thought it may be the fla was caching the result from this method, but it doesn't appear to be the issue. There is a workaround/hack to fix this for anyone else running into this barricade, and I will post it in momentarily.
I've found a new issue that I don't believe I will be able to have a fix for from JS. The check for allowDuplicates is being done solely in the swf. The onSelect is not being called in any browser. So basically, if you have allowDuplicates set to false, the following happens:
1) select 'file.jpg', it gets added
2) re-select 'file.jpg'. it does not get added
this would seem to work as designed, however the onSelect method does not get called. this prevents me from capturing the error. if you set allowDuplicates to true, this option will not work either.
Let me know if anyone else has run into this problem.
Thanks.
Always return true from the onSelect method, and then implement a validation method on the first line of the onAllSelect. Send as a param or bind to this the file object. The file will be registered with both the js and the swf at this point. Run your validation on each file, and if it doesn't pass your validation for limit size, limit files, etc., call the removeFile method from Swiff.Uploader and remove it. This will remove it from both the js and swf.
Haven't found a work around/fix for the allowDuplicates yet. Will keep looking.
what is the correct syntax to call removeFile()
for one file from inside function onAllSelect inside the script FancyUpload2.js
already tried
this.removeFile(fileObject);
removeFile(fileObject);
FancyUpload2.removeFile(fileObject);
no error message, but no file removed, no remove function called.
(I checked with an alert inside the remove function. the alert only shows when I manually delete a file from the file list shown in the browser)
http://www.adobe.com/support/flashplayer/downlo...
Went to Flash Player 9 area and clicked on this link
Download the Windows Flash Player 9 ActiveX control content debugger (for IE) (EXE, 1.56 MB)
I know it is only a temporary solution, but it worked for me.
This started to happen to a friend a few weeks back on IE. Now I'm getting the same thing on Firefox, and it works fine on IE. Any idea's?
My email is uweberer@gmail.com
Great script
Because the mouseover doesn't work.
My flash player version is : 10,0,12,36...
Do you think there will be a fix soon to solve this huge problem ?
Too bad ...
Regards
Thomas
Although it works fine on the site I have implemented it on, the example here reverts to the fall back form.
No display errors in Firebug. I'm confused.
Help me, please!
This page works fine in FF and IE.
But i d/l all the source and put in the EXACT code and nothing.
FIne in EE but nothing in IE. I will not pop the browse window. Any help at all.
IE 7 & flash 10
Thanks for this nice piece of software!
Thanks.
http://digitarald.de/project/fancyupload/2-0/sh...
Now I just gotta work out why when I click to download the .js files it just reloads the page, and when I right-click/save target as it downloads a fricken web page (it being Firefox)
In the new version it looks like the link to browse files has to remain in the same place in order for the browse feature to work, but with the new content pushing the link down, you can no longer click on it. You have to click where it used to be before.
Is there a function to refresh/redraw where the link is?
I'm a newby to javascript and got a big problem. I want to use fancyUpload for picture uploads in albums. In the form of the fancy upload I've put a combo box, where the user can choose an album. How can I pass through the data of this combo box to my upload.php file?
On Windows:
- FF2 & FF3 with Flash 10: does not work
- FF2 with Flash 9: works
- IE6 & IE7 with Flash 10 (I guess, because I don't know how to check the flash version on IE): works
On MAC:
- FF & Safari with Flash 9: works
I also tested one time on a FF2/Flash 9, it works, then I upgraded to Flash 10, and it stops straight aways with that empty error messsage. So I believe that this library does not work with Flash 10 :-(
this doesnt work in ff3, but works in ie7..
/regards
A web developer put a site together for us with FancyUpload 1.0. Now that Flash 10 broke it, I want to upgrade it to 2.0, but I don't want to lose the way he customized FancyUpload for us...
anybody no how to fix it? tutorial (or any documentation)
broswe files in IE 7 did't worked
i have to move mouse up a little broswe files worked!
it seems like position problem
Let me know if you find solution
<script language="javascript" type="text/javascript">
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'fieldName': 'photoupload',
'path': 'includes/js/source/Swiff.Uploader.swf',
'onLoad': function() {
$('demo-status').removeClass('hide');
//$('demo-fallback').destroy();
},
// The changed parts!
debug: true, // enable logs, uses console.log
target: 'demo-browse' // the element for the overlay (Flash 10 only)
});
/**
* Various interactions
*/
$('demo-browse').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
</script>
becaus it is no working here ....
Thanks.
__flash__argumentsToXML is not defined, I check the code but no luck to me.. any ideas?
the old version was working verry wel but i dont get this working :'(
I've run in to an issue: If you have the FancyUpload for flash 10 installed on a page protected with .htaccess username & password, then for some reason the script asks for the username & password again.
Has somebody solved this issue?
If your 'Browse files' button (anchor as in the above example) is situated in hidden content (i.e. in div with display:none) - it won't work because flash object is positioned absolutely over the button and the button doesn't have the real coordinates if it is hidden.
You need to reposition it (swiffy.reposition();) after i.e. the tab with the uploader was shown. 'swiffy' object should have global scope in this case:
var swiffy = '';
window.addEvent('load', function() {
swiffy = new FancyUpload2(........
Can u explain it for me?!? thx a lot
reposition() should be mentioned on the main page of FancyUpload, this might save other developpers a lot of wasted time. Thanks a lot for this comment!
Iam getting the flash movire over the browse flie link but after clicking on it iam not getting the File selector popup window.,
can u pl help me where is the problem ?
Works fine on other browsers for pre-setting type filter. Work around for now is to do a validation check on selection of a file and make sure it's a valid image, video, etc.
I have specifically pass the filter when invoking the swiffy.browse(myFilter).
When selecting a file that exceed the size limit, or count limit, the file will not be displayed in the list, but it will get uploaded when user click on upload button.
This problem happens on:
IE6 + Flash 9
IE7 + Flash 9
Works fine on:
FF2 + Flash 9
FF3 + Flash 10
I have several problems like many others and I would like to know If someone as a fix for them because I've been struggling with it for days.
Besides, I think it would be nice to have a forum because find help or help with only a comment system is quite difficult.
So the errors are :
1- Browse file button is misplaced on Firefox 3.0.x but it's fine on Safari or IE7
2- Browse file is fixed, but how handle it if the height of the page change?
3- IE7 ignore file filters
I know that there is a function "reposition" but I just can't call it, either target is unknown or an error that tells me that reposition is not a function if I try to declare swiffy as global var.
Any help would be greatly appreciated.
Anyone has a ZIP with the script 100% Ok please ?
I have got as far as understanding that when a large file is uploaded, script.php never gets sent a file.... but I can't trace back the steps to any code which does this.... is it part of the SWF...?
Help! lol!
But it looks like it doesn't work under with Windows Vista :(
Is it possible to have the ".fla" file with flash10 fix?
__flash__argumentsToXML is not defined
any reply rto admin@talente.ro will be highly appreciated
window.addEvent('load', function() {
and now I see in FIrebug
Uploader ready
but when click on BROWSE I get:
An error occured: Error
Muazzam Mehmood
Download Study Stuff
Discuss Study problems, new Ideas & Expertise
it's ok but i hav ethies error
this.parent is not a function
http://localhost/streamingvideopro/fancyUpload/...
Line 44
thanks
Try adding after the Swiffy-Constructor:
\$('demo-browse').addEvent('mouseover', function() {
swiffy.reposition();
});
Replace demo-browse with the ID of your actual browse button,
and swiffy with the actual instance name of the FacyUpload2.
It works fine! I got it to work completely after having beaten myself up for a couple of hours with source code and multiple Swiff.Uploader.swf file versions.
So It works for me with Windows Vista x64, EasyPHP 2.0, Firefox 3.0.5 and IE 7.0, both with Flash 10.0.12.36, but I have not tried online yet.
By the way, I added a piece of code in script.php (line 41), which allows files to be moved to an uploaded files folder, i.e. move_uploaded_file($file, "uploadedFiles/". $_FILES['photoupload']['name']);
Here you can find my final zip file. You just have to unzip it in your www folder.
http://www.megaupload.com/?d=5KUZKV5S
I Hope it will help many of you.
Regards, Max from France, and great thanks to FancyUpload developer!
Any idea why only up to 5 files are shown beneath the progress bar? Seems you have to remove them manually after upload has finished, if you want to see the rest of the files. Is that a bug? Any idea?
Regards
Flemming (Denmark)
limitFiles: 5,
in what ever you like
limitFiles: 40,
for free items.
just Visit on www.vg70.co.cc
click and pick
all items are only dedicated for u.
get it now.
I have been fighting with SWFUpload for 2 days now - too complicated.
I DL'ed your zipped file example of FancyUpload and it worked first time. Now to see if it works on my clients server.
Thank you so much.
His file:
http://www.megaupload.com/?d=5KUZKV5S
works great. If you use PHP <5 then use this function in your script.php file
if (!function_exists('json_encode'))
{
function json_encode($a=false)
{
if (is_null($a)) return 'null';
if ($a === false) return 'false';
if ($a === true) return 'true';
if (is_scalar($a))
{
if (is_float($a))
{
// Always use "." for floats.
return floatval(str_replace(",", ".", strval($a)));
}
if (is_string($a))
{
static $jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'));
return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"';
}
else
return $a;
}
$isList = true;
for ($i = 0, reset($a); $i < count($a); $i++, next($a))
{
if (key($a) !== $i)
{
$isList = false;
break;
}
}
$result = array();
if ($isList)
{
foreach ($a as $v) $result[] = json_encode($v);
return '[' . join(',', $result) . ']';
}
else
{
foreach ($a as $k => $v) $result[] = json_encode($k).':'.json_encode($v);
return '{' . join(',', $result) . '}';
}
}
}
Harald, can you tell what really needs for v1.0 (mootools 1.11 powered) to fix a bug with adobe's flash player v10? (Except SWF file I need to know how to fix it quickly).
limitSize: 2 * 1024 * 1024, // 2Mb
It’s ok with firefox but IE7 is not limited.
1) If i send a file size over 2Mb a new size is indicate in Overall Progress...
2) If i add another file (less than 2Mb) my first and second file is upload.
//////////////////////////////////////////////
limitSize: 10 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024, // 10Mb
///////////////////////////////////////////////
change this in script.php
if (!is_uploaded_file($file) || ($_FILES['photoupload']['size'] > 10 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 ) )
works great here :)
I use Flash 9 with FF and Flash 10 with IE7.
My version is patched for Flash 10, and my basic download is ok, but limitSize with IE7 and Flash 10 is not ok.
If i like send a file over limitSize this one is not download but the size is indicate in Overall Progress, and if i like send another file less than limitSize all (first and second) file is download.
I have this error in my website and in the page "Queued Photo Uploader (Fixed)" :
http://digitarald.de/project/fancyupload/2-0/sh...
in some IE7
Found your Updated code for Flash 10, used that, and the script doesnt work at all.
The onLoad: function() does not fire
The only problem that I have is when I try to use a include file command to import the page that contains this form and script. It just won't work. Does anyone have any insight into what could be the problem?
Thanks Harald!
I have spent some time trying to solve the "Error #2038 securityerror" that Safari (for Windows) and Chrome were showing me when I tried to upload files, while Firefox and Internet Explorer 7 worked well. The problem was that on the form that sends the files I put on the action something like "folder/get_file.php". This seams to cause a strange behaviour. To solve the issue I wrote "/main_folder/folder/get_file.php".
Maybe this is usefull ^_^.
Thanks a lot
Max's zip file does not work on IE7 - the fallback div does not hide :/ - works fine on Firefox though.
Thanks Max. .. anyone managed to make it work on all browsers using any flash version ?
Using IE7 I get the following:
Showcase with FancyUpload preview version. Detected Flash 0!
Do I have something wrong with my flash installation?
In order to work on IE7 you have to enable Protected Mode.
Hope this helps.
What are the optimal php.ini settings to make sure an 8meg file gets uploaded?
post_max_size = 8M;
Good luck
I have tried returning the options object back as well as passing nothing and onOpen never fires.
Any idea's?
I have made certain I have all includes properly pathed, and have downloaded the newest mootools, both compressed and non-compressed. I have seen several other people with this issue, but cannot find a solid resolution.
Ideas??
To clarify, with two instances on top of each other, adding files causes the second instance to drop down the page (normal behaviour). The overlay stays where it is, presumably the positioning is absolute. I can't think of any immediate way round this, but would be interested to hear your thoughts.
I try to add a Retry button when the upload failed but it seems to be difficult, does anybody have already done that?
Thanks a lot!
http://www.windowsnetworking.com/articles_tutor...
as stated it has security issues - but it's easy.
Does anyone know how to upload subfolders.
now you can choose 1 upload dir.. butt how to change to 3 dir ?
Tnx in advanced =)
Do you have any idea what could cause this?
i get an alert box showing "Error" when i click on the Browse link. can u tell what could be wrong ?
thanks,
rajesh
I'm stuck.
De error is generated in de function:
browse: function(fileList)
Tested fixed Version on Win + FF3 + Flash 10
Tested non-fixed on Mac + FF3 + Flash 9
...those work, but not in opposite constellation...
any ideas on that?
filter = {'Images (*.jpg, *.jpeg, *.png)': '*.jpg; *.jpeg; *.png'}; but filter function seems to work though
I've testen the above showcase on many different pc's and mac's.
It seems that it doesnt work on any Mac in combination with Flash 9.
Upgrading to Flash 10 solves the problem, but thats not always an option.
It's a great script and I would love to use it, is there anyone that got it to work on a Mac with Flash9?
The error I'm getting is 'httpStatus 301'.
Thanks in advance.
If I submit a form to the php handling page it get's the $_FILES[] data, but none of the $_POST data that was submitted with the same form. Anyone a suggestion/fix?
I've got this error:
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (scripts)' in E:ApachehtdocsprojectswebPhotolablibraryZendControllerDispatcherStandard.php:241 Stack trace: #0 E:ApachehtdocsprojectswebPhotolablibraryZendControllerFront.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 E:ApachehtdocsprojectswebPhotolabindex.php(71): Zend_Controller_Front->dispatch() #2 {main} thrown in E:ApachehtdocsprojectswebPhotolablibraryZendControllerDispatcherStandard.php on line 241
swf extension is written in .htaccess file
RewriteRule !\.(swf|js|ico|gif|jpg|png|css|txt|doc|html)$ index.php
beacause of the IE bug (Internet Explorer 6 / 7 / 8 partially ignoring return false inside onSelect and uploading the file even though it does not appear in the queue shown in the browser);
Thanks to the other posters for the initial suggestions. What I do is check the file for file type, minimum size and maximum size using a custom validateFile function in the swiffy constructor.
window.addEvent('load', function() {
var swiffy$artikelnr = new FancyUpload2( [...]
// more options here
validateFile: function(datei) {
// various tests here
if (correct==1) return true;
return false;
}
[...]
To get this actually working in Internet Explorer as well, I had to modify FancyUpload2.js
onSelect: function(file, index, length) {
var errors = [];
if (this.options.limitSize && (file.size > this.options.limitSize)) errors.push('size');
if (this.options.limitFiles && (this.countFiles() >= this.options.limitFiles)) errors.push('length');
if (!this.options.allowDuplicates && this.getFile(file)) errors.push('duplicate');
if (!this.options.validateFile.call(this, file, errors)) errors.push('custom');
if (errors.length) {
alert('zu loeschen');
this.zuloeschen=file;
var fn = this.options.fileInvalid;
if (fn) fn.call(this, file, errors);
// return false; // DONT RETURN FALSE YET AT THIS PLACE
}
(this.options.fileCreate || this.fileCreate).call(this, file);
this.files.push(file);
return true;
},
onAllSelect: function(files, current, overall) {
if (typeof(this.zuloeschen)!='undefined') {
if (this.zuloeschen!='') {
this.removeFile(this.zuloeschen);
this.zuloeschen='';
}
}
this.log('Added ' + files.length + ' files, now we have (' + current.bytesTotal + ' bytes).', arguments);
this.updateOverall(current.bytesTotal);
this.status.removeClass('status-browsing');
if (this.files.length && this.options.instantStart) this.upload.delay(10, this);
},
For everybody using my patch posted above, until the new version is ready, please note that this is not yet complete and will only remove 1 file! I will change it to use an array instead of the variable so it works properly.
// existing stuff ...
this.files = [];
this.zuloeschen = []; // new Array for invalid files, needed because of IE-bug
// more existing stuff ...
onSelect: function(file, index, length) {
// see above ...
if (!this.options.validateFile.call(this, file, errors)) {
errors.push('custom');
this.zuloeschen.push(file);
// ...
// ...
onAllSelect: function(files, current, overall) {
// see above ...
for (var zaehler in this.zuloeschen) {
var dateizuloeschen = this.zuloeschen[zaehler];
if (typeof(dateizuloeschen)!='undefined') {
if (dateizuloeschen!='') {
this.removeFile(dateizuloeschen);
} // endif not empty
} // endif defined
} // next file in array of invalid files
this.zuloeschen=[];
// ...
if it can't be work ,what should i rewrite?
thank you !!studing....
Sorted out that the error pops up in this function at ret!==true:
browse: function(fileList) {
var ret = this.parent(fileList);
if (ret !== true){
this.log('Browse in progress.');
if (ret) alert(ret);
} else {
this.log('Browse started.');
this.status.addClass('file-browsing');
}
},
1. IE7 - in log is success and file is correctly uploaded, but bad class is added and wrong icon (failed) appears.
I found out in comments something about activating of json in mootools. But I found nothing about activating json in mootools nowhere. How is it meant?
2. In firefox diesn't work at all. I think that is because of handle with session. Therefore is written a lot about it, I can't solve it, because doesn't help adding PHPSESSID, SESSID nor SID on the end of url. I think, that it has to be some Zend framework problem.
THIS IS THE CODE OF MY CURENT UPLOADER.PHP
require_once('inc/header.inc.php');
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'images.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'tags.inc.php' );
$_page['name_index'] = 82;
$_page['css_name'] = 'viewPhoto.css';
$_page['extra_js'] = '';
check_logged();
$_page['header'] = _t( "_upload Photo" );
$_page['header_text'] = _t("_upload Photo");
$_ni = $_page['name_index'];
$member['ID'] = (int)$_COOKIE['memberID'];
$check_res = checkAction( $member['ID'], ACTION_ID_UPLOAD_GALLERY_PHOTO );
if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED && !$logged['admin'] && !$logged['moderator'] )
{
$ret = "
<table width=100% height=100% cellpadding=0 cellspacing=0 class=text2>
<td align=center bgcolor=$boxbg2>
". $check_res[CHECK_ACTION_MESSAGE] ."
</td>
</table>\n";
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = $ret;
PageCode();
exit();
}
$iPhotoCount = (int)db_value("SELECT COUNT(*) FROM `sharePhotoFiles` WHERE `medProfId`='{$member['ID']}'");
if ($iPhotoCount < (int)getParam("shPhotoLimit")) {
$sStatus = '';
if (isset($_POST['upload']) && isset($_POST['medProfId'])) {
$sStatus = '<div>'._t("_File was uploaded").'</div>';
$iUser = (int)$_POST['medProfId'];
$sFile = htmlspecialchars_adv($_POST['title']);
$sDesc = isset($_POST['description']) && strlen($_POST['description']) ? process_db_input(htmlspecialchars_adv($_POST['description'])) : '';
$sTags = isset($_POST['tags']) && strlen($_POST['tags']) ? process_db_input(htmlspecialchars_adv($_POST['tags'])) : '';
$sStatus = uploadFile($sFile, $sDesc, $sTags, $iUser);
}
}
else {
$sCode = MsgBox( _t( '_Photo gallery limit was reached' ) );
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = $sCode;
PageCode();
exit();
}
$_page_cont[$_ni]['page_main_code'] = $sStatus.PageMainCode($site['url'], $member['ID']);
PageCode();
function PageMainCode($sSiteUrl, $iUser = 0) {
if ($iUser == 0)
return '<script language="javascript">window.location.href =\''.$sSiteUrl.'member.php\';</script>';
ob_start();
?>
<div id="agreement" style="text-align: center;">
<div style="font-weight: bold;"><?=_t("_Media upload Agreement",_t("_Photo"))?></div>
<div>
<textarea rows="20" cols="80" readonly="true"><?=_t("_License Agreement", $sSiteUrl)?></textarea>
</div>
<div>
<input type="submit" id="agree" value="<?=_t("_I agree")?>" onclick="document.getElementById('uploadShareMain').style.display = 'block';
document.getElementById('agreement').style.display = 'none';"">
</div>
</div>
<div id="uploadShareMain" style="display: none;">
<form enctype="multipart/form-data" method="post" action="<?=$_SERVER['PHP_SELF']?>">
<div class="uploadLine">
<div class="uploadText"><?=_t("_Title")?>: </div>
<div><input type="text" name="title" class="uploadForm"/></div>
</div>
<div class="uploadLine">
<div class="uploadText"><?=_t("_Description")?>: </div>
<div><textarea name="description" class="uploadForm"/></textarea></div>
</div>
<div class="uploadLine">
<div class="uploadText"><?=_t("_Tags")?>: </div>
<div><input type="text" name="tags" class="uploadForm"/></div>
</div>
<div class="uploadLine">
<div class="uploadText"><?=_t("_Select")?>: </div>
<div><input type="file" name="uploadFile" size="43"/></div>
</div>
<input type="hidden" name="medProfId" value="<?=$iUser?>"/>
<div class="uploadLine">
<div class="uploadButton">
<input type="submit" name="upload" value="<?=_t("_Upload File")?>"/>
</div>
</div>
</form>
</div>
<?
$sCode = ob_get_clean();
return $sCode;
}
function uploadFile($sFile, $sDesc, $sTags, $iUser)
{
global $dir;
if( $_FILES['uploadFile']['error'] != 0 )
$sCode = '<div class="uploadStatus">'._t("_File upload error").'</div>';
else {
$aFileInfo = getimagesize( $_FILES['uploadFile']['tmp_name'] );
if (!$aFileInfo)
$sCode = '<div class="uploadStatus">'._t("_You uploaded not image file").'</div>';
else {
$ext = false;
switch( $aFileInfo['mime'] ) {
case 'image/jpeg': $ext = 'jpg'; break;
case 'image/gif': $ext = 'gif'; break;
case 'image/png': $ext = 'png'; break;
default: $ext = false;
}
if (!$ext)
$sCode = '<div class="uploadStatus">'._t("_You uploaded not JPEG, GIF or PNG file").'</div>';
else {
$sCode = '<div class="uploadStatus">'._t("_Upload successful").'</div>';
$sActive = getParam("enable_shPhotoActivation") == 'on' ? 'true' : 'false' ;
$sPhotoUri = uriGenerate($sFile, 'sharePhotoFiles', 'medUri');
$sQuery = "INSERT INTO `sharePhotoFiles` (`medProfId`,`medTitle`,`medUri`,`medExt`,`medDesc`,`medTags`,`medDate`,`Approved`) VALUES('$iUser','$sFile','$sPhotoUri','$ext','$sDesc','$sTags',".time().",'$sActive')";
db_res($sQuery);
$iNew = mysql_insert_id();
reparseObjTags( 'photo', $iNew );
$sNewFileName = $dir['sharingImages'] . $iNew.'.'.$ext;
$sNewMainName = $dir['sharingImages'] . $iNew.'_m.'.$ext;
$sNewThumbName = $dir['sharingImages'] . $iNew.'_t.'.$ext;
$iUpload = (int)preg_replace('/\D/', '', ini_get('upload_max_filesize'));
$iPost = (int)preg_replace('/\D/', '', ini_get('post_max_size'));
$iMin = $iUpload > $iPost ? $iPost : $iUpload;
if ($_FILES['uploadFile']['size'] && $_FILES['uploadFile']['size'] > $iMin*1024*1024)
$sCode = '<div class="uploadStatus">'._t("_SIZE_TOO_BIG").'</div>';
else {
if (!move_uploaded_file( $_FILES['uploadFile']['tmp_name'], $sNewFileName))
$sCode = '<div class="uploadStatus">'._t("_Couldn\'t move file").'</div>';
else {
chmod( $sNewFileName, 0644 );
$iWidth = (int)getParam("max_photo_width");
$iHeight = (int)getParam("max_photo_height");
$iThumbW = (int)getParam("max_thumb_width");
$iThumbH = (int)getParam("max_thumb_height");
if (imageResize( $sNewFileName, $sNewMainName, $iWidth, $iHeight ) != IMAGE_ERROR_SUCCESS)
$sCode = '<div class="uploadStatus">'._t("_Upload failed").'</div>';
else {
imageResize( $sNewMainName, $sNewThumbName, $iThumbW, $iThumbH );
$bPermalink = getParam('permalinks_gallery_photos') == 'on' ? true : false;
$sFileLink = getFileUrl($iNew, rawurlencode($sPhotoUri), 'photo', $bPermalink);
header("Location:".$sFileLink);
exit;
}
}
}
$sqlDelete = "DELETE FROM `sharePhotoFiles` WHERE `medID`='$iNew'";
db_res($sqlDelete);
}
}
}
return $sCode;
}
help me please!
basicly i like your script.
But there is something i don't understand.
Why is on your sample a <input type"file"> To create a $_FILES? I can't seem te get the $_FILES. I do not want a input first. Just browse immidiatly. i get the files in the list. i can upload them with the flash animation. But in my PHP no $_FILES. I was thinking of creating a array within "onSelect"method. but i am not sure how to do this. any ideas? or perhaps info how to bypass the <imput>?
http://www.tomasrychetsky.ic.cz/admin/fancy.jpg
what was happened? how to fix it
help me please
thanks for reply
It´s possible?
when i press the link "Browse Files" I got an alert popup with the message "Error".
Is this normal, somebody has experienced this?
Cheers
<script type="text/javascript" src="js/mootools-1.2.1-core.js"></script>
<script type="text/javascript" src="js/Fx.ProgressBar.js"></script>
<script type="text/javascript" src="js/Swiff.Uploader.js"></script>
<script type="text/javascript" src="js/FancyUpload2.js"></script>
<form action="../picupload.aigo" method="post" id="form-demo" enctype="multipart/form-data">
<div id="demo-fallback">
<ul>
<input type="file" name="photoupload" id="demo-photoupload" />
</ul>
</div>
<div id="demo-status" class="hide">
Browse Files |
Clear List |
Upload
<div>
Overall progress
<img src="images/bar.gif" class="progress overall-progress" />
</div>
<div>
File Progress
<img src="images/bar.gif" class="progress current-progress" />
</div>
<div class="current-text"></div>
</div>
<ul id="demo-list"></ul>
</form>
But I have a question: how do I change the file types (with javascript) without the checkbox object?
-------------------------------------------------------------------
Swiff.Uploader = new Class({
Extends: Swiff,
Implements: Events,
options: {
path: 'Swiff.Uploader.swf',
multiple: true,
queued: true,
typeFilter: null,
url: null,
method: 'post',
data: null,
fieldName: 'Filedata',
target: null,
height: '100%',
width: '100%',
callBacks: null
},
initialize: function(options){
if (Browser.Plugins.Flash.version < 9) return false;
this.setOptions(options);
var callBacks = this.options.callBacks || this;
if (callBacks.onLoad) this.addEvent('onLoad', callBacks.onLoad);
if (!callBacks.onBrowse) {
callBacks.onBrowse = function() {
return this.options.typeFilter;
}
}
var prepare = {}, self = this;
['onBrowse', 'onSelect', 'onAllSelect', 'onCancel', 'onBeforeOpen', 'onOpen', 'onProgress', 'onComplete', 'onError', 'onAllComplete'].each(function(index) {
var fn = callBacks[index] || $empty;
prepare[index] = function() {
self.fireEvent(index, arguments, 10);
return fn.apply(self, arguments);
};
});
prepare.onLoad = this.load.create({delay: 10, bind: this});
this.options.callBacks = prepare;
var path = this.options.path;
if (!path.contains('?')) path += '?noCache=' + $time(); // quick fix
this.parent(path);
var scroll = window.getScroll();
this.box = new Element('div', {
styles: {
position: 'absolute',
overflow: 'hidden',
height: '100%', width: '100%',
top: scroll.y, left: scroll.x
}
});
this.inject(this.box);
this.box.inject($(this.options.container) || document.body);
//modefy
var elTemp = new Element('span').set('text', this.options.buttonText);
elTemp.inject($(this.options.container),'top');
//$(this.options.container).set('html', this.options.buttonText + $(this.options.container).get('html'));
return this;
},
load: function(){
this.remote('register', this.instance, this.options.multiple, this.options.queued);
this.fireEvent('onLoad');
this.target = $(this.options.target);
if (Browser.Plugins.Flash.version >= 10 && this.target) {
this.reposition();
window.addEvent('resize', this.reposition.bind(this));
}
},
reposition: function() {
var pos = this.target.getCoordinates(this.box.getOffsetParent());
this.box.setStyles(pos);
},
/*
Method: browse
Open the file browser.
*/
browse: function(typeFilter){
this.options.typeFilter = $pick(typeFilter, this.options.typeFilter);
return this.remote('browse');
},
/*
Method: upload
Starts the upload of all selected files.
*/
upload: function(options){
var current = this.options;
options = $extend({data: current.data, url: current.url, method: current.method, fieldName: current.fieldName}, options);
if ($type(options.data) == 'element') options.data = $(options.data).toQueryString();
return this.remote('upload', options);
},
/*
Method: removeFile
For multiple uploads cancels and removes the given file from queue.
Arguments:
name - (string) Filename
name - (string) Filesize in byte
*/
removeFile: function(file){
if (file) file = {name: file.name, size: file.size};
return this.remote('removeFile', file);
},
/*
Method: getFileList
Returns one Array with with arrays containing name and size of the file.
Returns:
(array) An array with files
*/
getFileList: function(){
return this.remote('getFileList');
}
});
//-----------------------------------------------------------------
exsample
<div id="demo-status" class="hide">
Browse Files
|
<input type="checkbox" id="demo-select-images" /> Images Only |
Clear List |
Upload
<div>
Overall progress
<img src="/core/interface/silver/js/upload/bar.gif" class="progress overall-progress" />
</div>
<div>
File Progress
<img src="/core/interface/silver/js/upload/bar.gif" class="progress current-progress" />
</div>
<div class="current-text"></div>
</div>
<ul id="demo-list"></ul>
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('demostatus'), $('demolist'), {
url: 'uploader.php',
fieldName: 'photoupload',
path: 'Swiff.Uploader.swf',
limitSize: 2 * 1024 * 1024, // 2Mb
debug: true,
container : 'demo-browse',
buttonText : 'Select FILE'
});
/**
* Various interactions
*/
$('demo-browse').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});
$('demo-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
whatever the number of files you select, only 5 appear in the list and then only 5 are uploaded
IE takes the upload url relative to the swf, all other browsers relative to the html/current file. So the best solution is an absolute path for the option url or rather the form action. If you have problems with failed upload and 404 error codes, try an absolute url, in your form-action or url option when creating your FancyUpload instance.
Will you update jquery ver. too ?
Found http://github.com/joergbattermann/fancyupload-j..., not up to date :( !
Thx !
Any solutions digitarald plzz!? Would be great. :)
What gives?
It is however working in IE 6. How do we / I get it working in the modern browsers?
Cheers, MF
Can you do more debugging (adding logs to the detect function?)
on your site?
I get the flash 10 part where i can choose:
-browse files
-image only (checkbox)
-clear list
-upload
When i click on 'browse files' nothing happens.
When i hoover over 'browse files' in IE the mouse cursor changes in the 'hyperlink mode'. In Chrome en Firefox it doesn't the mouse cursor stays an arrow.
I can click on 'clear list' and 'upload files'. The first one shows an action (overall progress changes in 'overall progress 0b').
I don't get a javascript error in the down left of my screen.
I tried this with:
-firefox
-chrome
-ie7
I installed all the files and checked paths to the files. This is all ok.
Does someone know how to fix this?
Maybe this helpes:
http://www.blost.nl/test.html
Note: the preview from digitarald.de as shown above works fine.
highsiera <at>yahoo.com
. I am having problem in making the code work. Thanks.
I have to change the filter ?
thanks for all your hard work digitarald w/ these projects! :)
Anyone knows what might that be?? It works like a charm on PC but not on MAC??
When i pressing "Browse files" link i got a message box with test "error".
I have Vista with flash 10.
Bug appears also on other computers.
http://digitarald.de/project/fancyupload/3-0/sh...
It works so much better and faster than Gmail's. It uploaded the photos I selected in no time. I'm very impressed with your work. Thank you so much for all the effort you put in to this. It really shows.
I'm trying to do exactly this but am not seeing any values showing up in the $_POST array. I'm trying to do the following but it's not working... any insight is greatly appreciated.
var fancyuploader = new FancyUpload2(...);
fancyuploader.setOptions({ postVar1: 'value' });
With fireEvent e.g.?
ps: i want to call it from the 'onProgress' function.
pps: srry for my bad englisch, im from holland ;-)
forums. See you over there, hopefully :-)
this great tool thanks for this....
can you tell me how on clicking on remove in list i remove file from server and also from database.
waiting for reply....
its very urgent...
regards,
Jack
Mark
An error occured: done!
Fatal error: Call to undefined function: json_encode() in /script.php on line 180
Upload failed: Error caused a send or load operation to fail (Error #2038)
Upload failed: Server returned HTTP-Status #405
I am working on my .net project with fancyupload but this problem gives me the headache.
Any help will be very much appreciated.
TIA!!
first, your Upload is very very nice and exactly that, what i'm searchin' for my PHP-Gallery called "simpleGallery", but if i want to include the FancyUpload into my Site, i get this Error:
"FancyUpload3 is not defined
[Break on this error] var up = new FancyUpload3.Attach('demo-list', '#demo-attach, #demo-attach-2', {"
The Folder are the same and nothing was changed. I only start the file without http://digitarald.de/project/fancyupload/3-0/sh... but i start the Upload via http://localhost/Projekte/simpleGallery/fancy_u....
I have no idea what is wrong?!
Sorry for my bad english.
I hope you can help me.
Do you have a example for use limitFiles?
Where change this limit?
Thank you
Álvaro
1. create var mylimit = 10;
2. replace in onselect : if (this.options.limitFiles && (this.countFiles() >= mylimite)) errors.push('length');
Now, I need solve another problem.
I am writing in Mysql each image loaded.
Only it needs to put an 'N' in each record, where do I put the last 'S' to be the image of attention.
Question: How get the number of images already added to the last I can put the 'S' in file script.php
Thank you
how shold i convert php to .net plz help
Maik
JSON doesn't work, yes I've downloaded the library, but always get an error.
How would I make FancyUpload understand something else?
Or could someone let me know what is supposed to be printed?
Thanks
Is there a way the FancyUpload works with PHP4: jason_encode function doesn't exist in PHP4?
I have a problem, the single file button works very well in FireFox, IE and Safari on a PC
But I have a problem with MAC, the script stop in this line : var result = JSON.decode(file.response.text);
It seems like the JSON.decode don't work in MAC ! Anyone have an idea of my problem ?
Thanks in advance
Minor changes to css and / or html structure and its not working anymore
How to do that
From Spain
just because its free doesn't mean you don't have to be resourceful... i found the script great and i too discovered what you have.. but i am not whining.. the whole thing is fuel enough to make my head spin and i like it..
tutorial/step-by-step-approach that I could add to the page, please send it.
I'm currently out of town for consulting, hope to get back to my free
projects soon, I have several updates on the boiling plate.
up.options.url = library/script.php?dir=some
You can dinamically change the destination folder by altering the url option of the object.
Then you should edit the script.php in the moving uploaded file section:
if (isset($_GET['subdir'])) {
$subdirectorio = $_GET['subdirectorio'];
move_uploaded_file($_FILES['Filedata']['tmp_name'], $subdir . $_FILES['Filedata']['name']);
$return['src'] = $subdir . $_FILES['Filedata']['name'];
Anyway to change status or remove that button
background-position: +50% 0;
Is it possible, to notate an additional plus?
Thx for your post Harald!
Minor changes to css and / or html structure and its not working anymore
How can we solve it?
Thanks for sharing!
Try. Anyway, my pictures are naturally in alphabetic order.
It was just a <span> tag i added some days ago in the section.
Of course! Flash didn´t managed that because of a hierarchy issue.
Thanks a lot for this uploader! It´s great.
I try the example here with the IE6 and i got the same problem.
Is someone make it work on IE6.
I'm on a deadline here.. pls help ..
rori088@gmail.com
Thanks ..
Really, why even bother?
Most people on the panet do not know how this works of how to code - just provide the damn files.
Saying that, this one has an example so I have no idea what "x" is talking about.
a package with all files. Of course, a basic understanding of MooTools and
its class-handling makes it easier to dive into the code.
(I tried asking this in the forum, but got an error logging in, there seems something broken).
inputs.
iframes don't offer upload progress *and* multiple-upload dialogs. 2:0,
flash wins.
inputs.
iframes don't offer upload progress *and* multiple-upload dialogs. 2:0,
flash wins.
The reason this is crucial in a lot of web based applications is that large organizations will not install Flash.
Flash only wins if available. But multi-upload is possible without it... that's all.
thanks for the code, though, hopefully i can find the source to reformat it :P
please any body know tell me.
when i upload a file and file size is greater than file limit size then show a error message before uploading.?
nothing stops, the thing just keeps on uploading.
how do I get it to work?
if ($type(options.data) == 'element') options.data = $(options.data).toQueryString();
So, that means that if you have a form w/ id 'upload_ticket' you can do this to gain access to $_POST array in your upload script.
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
'url': $('form-demo').action,
'data': $('upload_ticket'), //will convert the form to query string.
'fieldName': 'upload',
'path': 'swiff/Swiff.Uploader.swf',
'onLoad': function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
Took me a lil while to figure out, so I thought it might help everyone else.
Harald -- Rock on. version 2 kicks arse.
On the website the user is identified by a Cookie, but when recieving the files, no cookie is avalible.
How can I do this?
I've got an input box to write the title of the song which will be upload, and I need to save this value in my db. I know that we can't send $_Post with fancyupload and I see in the 'Tips, Tricks and Quirks' that we can change the upload URL in the upload() method or see the example from Josh Beck on using Ajax to send additional data.
But I don't understand how to do that, can somebody help me ?
(line 89) var json = $H(JSON.decode(response, true));
It's not
(line 89) var json = $H(json.decode(response, true));
? With that, even I don't know where are the files, I don't have errors
when I commented this line the uploader works.. well it wors basically that I can select files and have them listed, but uploading perse is still not working yet.
however there is a second page of comments - Comments 26 – 50 of 25:
I believe that ought to read "of 50"
Thanks
If someone can make a tutorial for beginners...
Thanks
any ideas?
thank you.
I have little note to add. onAllComplete state can be tricky because its not excatly what it says with some AJAX usage. For example when you set variable counter in PHP - a session variable and you call function in JS which will load page with AJAX then you will find that this variable dosent exist yet, because page procesing proces goes like this : onAllComplete -> call AJAX function -> display variable from dest upload PHP script -> variable is set in destination upload script. It should be like this : variable is set in destination upload script -> onAllComplete -> call AJAX function -> display variable from dest upload PHP script
Hope it will help someone. Cheers. Keep up the good job.
process.php?PHPSESSID=<?=session_id();?> so i append as what you said on the tips and tricks
and then on process.php
i put session_start();
and then i try to retrieve some value from session like
echo $_SESSION['valueID'] ; but it doesn't show the value, is that possible? or if does please kindly guide me.. anyway i really thank you for creating this great widget. :)
in process php do something like this
$sessionid=isset($_GET[‘valueID’)?$_GET[‘valueID’]:null;
if (!empty($sessionid)) { session_id($sessionid);}
if( !isset($_SESSION) ) {session_start(); }
works for me anyway