filestore and upload file

Showing 1-8 of 8 messages
filestore and upload file herizo ludovic 11/9/12 11:52 PM
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.


Re: filestore and upload file herizo ludovic 11/12/12 6:32 AM

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,
 
Re: filestore and upload file Imants Horsts 11/12/12 3:37 PM
Just a quick idea - maybe you don't have permission to save files in any other folder than temp?
Re: filestore and upload file herizo ludovic 11/12/12 11:02 PM
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,


Re: filestore and upload file herizo ludovic 11/13/12 1:03 AM
 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


Re: filestore and upload file Imants Horsts 11/13/12 2:02 AM
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.
Re: filestore and upload file herizo ludovic 11/13/12 8:30 AM
         

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

 
Re: filestore and upload file Imants Horsts 11/13/12 11:05 AM
OK, I'll put it as issue in Github and check what can be done with mime_content_type().