GetSimple Support Forum

Full Version: Upload problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 !
FlashBlock?
sal Wrote:FlashBlock?

Same problem after having disable my no-ads plugin on Firefox and I don't have any IE8 plugin.
Did you chmod the data (all all sub-folders) correctly?
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.
Aah, great catch, apparently not all files are using the constants yet as these are relatively new.
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?
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);
you cant use an absolute path when viewing a file like that, so changing $path to use the constant wouldnt work
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
Hugo -> modification on upload-ajax.php described in post #5 is the solution...