I'm trying to upload files through Create Content > File, but receive the following errors upon save:

* Error saving file FatFreeSkimExtraHfGalcc-sm.jpg. Please, contact site administrator.
* A file upload must be provided.

Then, when I look at the Recent Log Entries, a File error appears:

*Location: http://[website]/node/add/file
*Referrer: http://[website]/node/add/file
*The RDF data was not deleted for the subject s=.

But, when I view the directory in my FTP client, I see a file was created and uploaded to /sites/default/files/bitcache/file/

So, the upload appears to be successful. However, when i try to add the file as an attachment to a node, nothing appears in the browse window, and I'm unable to access the "file" node to make edits.

I've tried uninstalling the RDF, Bitcache and File modules and reinstalling them in order: RDF then Bitcache, and finally Files. As well, I've set write permissions to the /sites/default/bitcache/files directory to 777. Nothing seems to help.

Any ideas on how to fix this? Thanks very much.

Comments

miglius’s picture

Status: Active » Postponed (maintainer needs more info)

For the beginning can you check if 'File framework' repositories were created in both bitcache and rdf at 'admin/settings/bitcache/repositories' and 'admin/settings/rdf/repositories' respectively?

michaelaj’s picture

Yes, they've been created in both places.

michaelaj’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I reapplied file permissions to the /sites/default/files/bitcache/file directory and made sure the directory owner was correct. Now, it appears to be working—where I can create new file nodes and attach them to other node types. So all appears to be working fine now. Marking this as closed: User error.

Thank you for the great module! This is exactly what I needed.

Webbstre’s picture

Hate to reopen a solved problem, but I am having the same error and having trouble getting it fixed.

The part I am not sure if I am doing right is here: "For the beginning can you check if 'File framework' repositories were created in both bitcache and rdf at 'admin/settings/bitcache/repositories' and 'admin/settings/rdf/repositories' respectively?" I know the bitcache portion is right, because the files are uploaded, but I had no "File" repository for RDF. When I tried to make one with the same settings it gave me sql errors about the name already being in use. I tried changing the ID to file_rdf but it didn't help.

Any suggestions? I think this is the LAST error I need before I can start testing my file database

Webbstre’s picture

Status: Closed (fixed) » Active

Just going to set this to active in the hopes it will be easier to notice.

miglius’s picture

Please upgrade to the latest development version of File Framework, Bitcache and RDF, then disabe and enable the File Framework. Missing repository (if any) should be recreated.

Webbstre’s picture

I am already using the latest development versions of each. Unfortunately, it doesn't seem to want to create any repositories at all. I had to manually make the bitcache one as well. Could there be a permissions problem involved?

Webbstre’s picture

Well, I decided to take a hit and just reinstall drupal completely, with fresh files and fresh mysql tables. The first thing I did was set all permissions for the drupal folder to 775 (it's in a passworded directory, so it is safe enough for my test instal), then install one at a time and in this order, RDF, Bitcache, and File Framework, all development versions. Now it works.

I am going to guess the main problem is the repositories, because the original installation was missing those and didn't even create the bitcache folders. In any case, dev versions work for now.

highermath’s picture

This is an issue that has been covered elsewhere. This is a problem that comes up when the Bitcache (the tool that actually stores and labels the files) REST API (the piece that connects Bitcache to the file metadata stored as RDF data) loses its permissions.

The solution is:

First, confirm that files permissions on the server are correct for the directory where the bitcached files are stored.

Second, go to admin/settings/bitcache, disable the Bitcache REST API, save, then enable it and save again.

Finally, clear all caches - admin_menu/flush-cache (if admin-menu is enabled).

The REST API only handles the metadata until the file is stored, after that, the metadata are attached to the node and stored in the database.

tricasse’s picture

This worked perfectly. Thank you for your help!

Anonymous’s picture

It doesn't work...You can help me? thanks

johanneshahn’s picture

Status: Active » Fixed

No activity
Feel free to reopen

johanneshahn’s picture

Status: Fixed » Closed (fixed)

.