filestore and upload file

138 views
Skip to first unread message

herizo ludovic

unread,
Nov 10, 2012, 2:52:23 AM11/10/12
to agile-too...@googlegroups.com
Hi,
i need help with the filestore addon. After trying different ways  i make the some tests to see if the addon is working correctly.

-So i import the tables filestore filestore.001.sql
- i've created the upload directory and set it writable.
-i've make a page fileadmin with the following code inside.
class Page_FileAdmin extends filestore\Page_FileAdmin {
}

then i have the tabs with cruds to manage files and test for upload.

But when i try the test upload i just have the tempfile in the upload directory. that's all.
i looked in the tables and nothing appears about the file so the tables was not updated
I use firefox 16 without firebug and wampserver 2.1 and with latest atk4 and atk4 addons.


herizo ludovic

unread,
Nov 12, 2012, 9:32:23 AM11/12/12
to agile-too...@googlegroups.com

I've tried on chrome but it is not working yet. If nobody else have the same bug, may be it with the database or my code.

Regards,
 

Imants Horsts

unread,
Nov 12, 2012, 6:37:44 PM11/12/12
to agile-too...@googlegroups.com
Just a quick idea - maybe you don't have permission to save files in any other folder than temp?

herizo ludovic

unread,
Nov 13, 2012, 2:02:04 AM11/13/12
to agile-too...@googlegroups.com
Hi imants,
Thank you very much for your answer!
i test with a single php script to upload à file in the directory.
<?php
    if(isset($_FILES['myfile'])){
        $fn = $_FILES['myfile']['name'];
        $path = 'impeng/upload/';
       
        if(move_uploaded_file($_FILES['myfile']['tmp_name'], $path.$fn))
        {echo 'OK';}
        else
        {
            echo 'something is not working';
        }
    }
?>

<form action="test.php" method="POST" enctype="multipart/form-data">
<input type="file" name="myfile"/>
<input type="submit"/>
</form>

and it is working perfectly so i believe that it is not with permissions.

Then for now i use only the fileadmin extended from orginal fileAdmin class in filestore without any change and original filestore database structure(imported from misc/docs/filestore.001.sql).
But i don't know where is the problem...
Just a precision, i mean as tempame the generated name . i have a file like this: "upload/0/fs8C.tmp"
the 0 directory is generated by the addon. the file size is the same so the file was uploaded but without original name and others infos and nothing inside the database structure. may be give you an idea about the problem...

Regards,


herizo ludovic

unread,
Nov 13, 2012, 4:03:46 AM11/13/12
to agile-too...@googlegroups.com
 i verified in the source code of the addon filestore.
the part with beforesave hook is working

but no save action is performed.

Thank you in advance for every suggestions or idea


Imants Horsts

unread,
Nov 13, 2012, 5:02:45 AM11/13/12
to agile-too...@googlegroups.com
I guess I'll not answer this question. I have not used filestore myself yet, so...
Maybe Romans will answer this if he'll have time.

herizo ludovic

unread,
Nov 13, 2012, 11:30:17 AM11/13/12
to agile-too...@googlegroups.com
         

     The addon is not working correctly. it is because the function 'mime_content_type()' is depreciated.
    

 

Imants Horsts

unread,
Nov 13, 2012, 2:05:42 PM11/13/12
to agile-too...@googlegroups.com
OK, I'll put it as issue in Github and check what can be done with mime_content_type().
Reply all
Reply to author
Forward
0 new messages