Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upload problem
#1
Hello,

When i try to upload some files in admin, no files are added neither in folder nor in interface.
However, when the upload is finished i can see "Completed".
Moreover, upload works correctly when JS is disable.

Problem environment :
- "Health" says that everything is OK.
- Tested with many pictures < 2 Mo
GS 2.01 - Php 5.3 - Firefox 3.6 and IE8
- No error in Php log
- No error in Apache log

No request seems to be sent (console Firebug) before the "refresh" call of upload.php


Thanks for your help !
Reply
#2
FlashBlock?
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#3
sal Wrote:FlashBlock?

Same problem after having disable my no-ads plugin on Firefox and I don't have any IE8 plugin.
Reply
#4
Did you chmod the data (all all sub-folders) correctly?
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#5
The problem was the 'DOCUMENT_ROOT' : in my case, he had nothing to do with GS.
So, the solution is :

In upload-ajax.php
Replace the line : $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
With : $targetPath = GSDATAUPLOADPATH;

In order to have the same code to do the same thing, we can do the equivalent in upload.php
Replace the line : $path = tsl("../data/uploads/");
With : $path = GSDATAUPLOADPATH;

The code is now more simple and works very well in all cases.
Reply
#6
Aah, great catch, apparently not all files are using the constants yet as these are relatively new.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#7
i made the change to the core for upload-ajax, but the one in upload.php would change how the links to files/images are shown, correct?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#8
It changes how they are shown and the upload location :
Code:
$file_loc = $path . $count.'-'. $_FILES["file"]["name"];
[...]
move_uploaded_file($_FILES["file"]["tmp_name"], $file_loc);
Reply
#9
you cant use an absolute path when viewing a file like that, so changing $path to use the constant wouldnt work
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#10
Thanks spilarix for bringing up this isue with the file uploader.
The same thing has happened to me and I intend to try it out with the java script thing turned off.
I have read through the other comments for a solution but for a novice like myself I have not understood how to sort the problem out. That is if there is a solution found yet. I hope that this uploader will work in the next version.
I would like it if there is a solution explained in another way for a person like me who needs things explained in more detail.
Many thanks for this topic
and A big thanks to get simple for the best cms I have come accross. I'm loving it.
from Hugo
Reply
#11
Hugo -> modification on upload-ajax.php described in post #5 is the solution...
Reply




Users browsing this thread: 1 Guest(s)