Page 1 of 1

Fileupload not saving in its directory

PostPosted: Fri Jun 10, 2011 10:40 am
by rlevin
The fileupload is returning a successful save message, but the directory itself is empty. using http://www2.xataface.com/documentation/ ... le-uploads as a reference, I preferred method 2:Storing files on the file system. I created a field, tableAFile, in the database table.

My field.ini for tableA looks like this
[tableAFile]
Type = container
widget:type = file

In tables/tableA directory, I created another directory called tableAFile, which is the default savepath directory. I gave the users full control just to be sure it wasn't a permissions issue, but I still get an empty directory after saving a file. Any ideas what the problem may be?

Re: Fileupload not saving in its directory

PostPosted: Fri Jun 10, 2011 12:07 pm
by shannah
Check your error log. It will give some clues. Common causes of this include:
1. File size too big (need to set higher limits in associated parameters).
2. Permissions on directory don't allow writing.
3. Directory is named incorrectly (case sensitive).

-Steve

Re: Fileupload not saving in its directory

PostPosted: Tue Jun 14, 2011 7:36 am
by rlevin
The error log returned no errors. The file I tried uploading is 9kb, which shouldn't be a problem considering the size. I gave the user full control over the directory, but I still get the same results. To rule out any permission problems, I decided to use method 1: storing as a blob. I created 3 fields in my table called file (longblob), file_mimetype (varchar(64)), and file_filename (varchar(64)).

Heres the fields.ini

[file]
Type = container
widget:type = file

[file_mimetype]
widget:type = hidden

[file_filename]
widget:type = hidden

When I save, the fields store nothing. Any ideas?

Re: Fileupload not saving in its directory

PostPosted: Tue Jun 14, 2011 8:23 am
by shannah
If you're storing as a blob, then it wouldn't be a container field. I.e. you would need to remove Type=container

I suspect the problem is at the server level though .. (likely either your PHP settings, apache settings, or server permissions) - so very likely blob won't work either.

Re: Fileupload not saving in its directory

PostPosted: Fri Jun 17, 2011 7:33 am
by rlevin
Im trying to dig deep in this problem, if you don't mind me asking, what files are being affected by the file upload widget? I find one file in xataface/dataface/formtool/file.php.