[Xerte-dev] Change to wizard to catch wrong "Upload successful" message
Smith, John
J.J.Smith at gcu.ac.uk
Thu Aug 1 14:21:36 BST 2013
Thanks Tom,
Can you look at adding this to the wizard (I don't have write permissions to the xerte SVN - I also get some font error when I publish).
It seems that we get a lot of people saying "It says it uploaded ok, but it won't preview" or similar and wondered if we can do things better in the wizard... anyway, we get no feedback in AS2 from the uploader as to whether it was successful or not BUT we do have file_exists.php
Anyway, have changed my install to use this code (at around line 2600 in the wizard.fla file)
listener.onComplete = function(file:FileReference):Void {
var file_exists_result_lv:LoadVars = new LoadVars();
file_exists_result_lv.progWin = this.progWin;
file_exists_result_lv.onLoad = function(success:Boolean) {
if (success) {
if (file_exists_result_lv.return_value=="true"){
Alert.show("Upload successful");
button.files = file.name;
button.fileUploaded(button);
}
else {
Alert.show("Upload failed: Check permissions");
}
this.progWin.deletePopUp();
}
}
var file_exists_lv:LoadVars = new LoadVars();
file_exists_lv.file_name = _root.rlovariable + file.name;
file_exists_lv.sendAndLoad(_root.preview_path, file_exists_result_lv, "POST");
};
So after a success it tests with file_exists.php to see if the file is actually there... the messages could be made international (there are lots of English messages still hardwired in here though) but other than that it works...
Can you give it a quick test and commit if you are happy with it as it's another level of useful feedback for the user...
Regards,
John Smith
Learning Technologist
School of Health & Life Sciences
Glasgow Caledonian University
-----Original Message-----
From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders
Sent: Thursday, August 01, 2013 12:59 PM
To: For Xerte technical developers
Subject: [Xerte-dev] Re: upload.php in 2.0 not working for .mp4 files??
No problems. Removed for now, until we now it actually helps....
Op 1-8-2013 13:40, Smith, John schreef:
> Hi Tom,
>
> Sorry... Yes please either remove the moov atom re-write from v2 or transfer the code - that code wasn't supposed to be in v2 yet but the upload files obviously got mixed up when I made that last fix for the safari cookie bug...
>
> Regards,
>
> John Smith
> Learning Technologist
> School of Health & Life Sciences
> Glasgow Caledonian University
>
>
> -----Original Message-----
> From: xerte-dev-bounces at lists.nottingham.ac.uk
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom
> Reijnders
> Sent: Thursday, August 01, 2013 12:28 PM
> To: 'For Xerte technical developers'
> Subject: [Xerte-dev] upload.php in 2.0 not working for .mp4 files??
>
> John,
>
> Could it be that you pushed the trunk upload.php to 2.0 and forgot to add tools/moovrelocator to 2.0?
>
> I had an HTTP error when trying to upload a .mp4 (Chrome reported an error 500 on the post).
>
> It turned out that:
> a. I didn't have tools/moovrelocator in my installation b. When I installed it by hand, Moovrelocator couldn't find atom/Atom.php because of some path manipulations for a require_once. It replaces the $_SERVER['DOCUMENT_ROOT'] with an empty string. That results in an invalid file name being required.
>
> After I fixed that, things seem to work again. I didn't have time whether the file is pseudo streaming yet.
>
> So, should I push tools/moovrelocator to 2.0 or shall we remove it from upload.php?
>
> Tom
>
> --
> --
>
> Tom Reijnders
> TOR Informatica
> Chopinlaan 27
> 5242HM Rosmalen
> Tel: 073 5226191
> Fax: 073 5226196
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
>
> Glasgow Caledonian University is a registered Scottish charity, number
> SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6
> 219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,1
> 5691,en.html _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
Glasgow Caledonian University is a registered Scottish charity, number SC021474
Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
More information about the Xerte-dev
mailing list