I have searched this forum and used my Google-Fu but I cannot find find for this error: "The file [file.jpg] could not be saved. An unknown error has occurred." Our developer (I'm the designer) is yet to be replaced, and we have a launch scheduled for Tuesday 9/3, so we're in a tough spot. The crucial element is to be able to upload images. All help is GREATLY appreciated.

We have several Drupal installs on this server, all referring to a shared module folder. We're getting this error across all of them.

When I hit Upload I get the error "The file [file.jpg] could not be saved. An unknown error has occurred." followed quickly by "Upload failed." The log is not catching anything, no errors. It's not a file size or type issue (been there), or user permissions (done that), or the particular directory being uploaded to (see: t-shirt). IMCE is up to date, and for giggles I made sure CKEditor was, too. I've confirmed that IMCE's settings are correct.

I'm thinking server permissions or Javascript issues...? Those both came up in my semi-relevant search results, but no one had success with permissions and I'm not sure how/what I need to do for the latter.

Same errors when use an image field on a node:

The file news.jpg could not be saved. An unknown error has occurred.
The file in the Blog Image field was unable to be uploaded.

Files: 
CommentFileSizeAuthor
errpr.png2.85 KBRU.gould

Comments

Priority:Major» Normal

This error thrown by includes/file.inc. PHP fails to upload a file but does not report any of the known error codes. You should check your web server logs.

I have the same issue. Web server logs are empty.

Issue summary:View changes

Additional info

I encountered this problem when I was out of space on the file system temporary directory

Check to see where your temporary directory is at admin/config/media/file-system and see if that disk is out of space.

UPDATE: While Drupal uses the temporary directory specified at admin/config/media/file-system, the server still uses whatever directory PHP specifies in the upload_tmp_dir variable in PHP.ini. The advice in the previous comment applies to this directory, too: Make sure that it's not full and that the file that you're uploading doesn't exceed the space available.

I am also experiencing this issue. On a WHM/CloudLinux server I have several Drupal 7 sites running. It was running PHP 5.2.17 and I upgraded that to 5.4.23 using easyapache. After that update I get the generic error referenced in this thread that leaves no error logs on the server and has very few hits on google.

CloudLinux has the option of changing PHP versions for an account so I also tried 5.2 and 5.3

My tmp directory is fine and writeable, and in fact everything was working fine across these Drupal sites before the easyapache update. Image styles are being generated, modules are saving their thumbnails - it seems Drupal has no issue doing its own things with the existing files but users are unable to upload any files, anywhere.

No errors, no problems reported. Totally baffling.

Issue summary:View changes

I have experienced the same issue several times. The solution might be different based on your hosting environment. I am hosting my Drupal site under a window 2008 server + IIS stack. However, I finally figured that the error about "could not be saved. An unknown error has occurred" especially when the log did not catch anything normally caused by permission issues.

The tricks to fix this problem is about set correct user for corresponding directories:

  1. First of all, refer to [your site]>>Administrator>>Configuration>>Media>>File system for your Public file system path and Temporary directory.
  2. Make sure grant write permission on your server to the web server user (IUSR for IIS).
  3. Another very tricky part is for the PHP.ini config which looks like only occurred on Window server. There is a setting for upload temp folder:
  4. ;Temporary directory for HTTP uploaded files (will use system default if not
    ;specified).
    ; http://php.net/upload-tmp-dir
    ; upload_tmp_dir =
    If you already try everything and nothing works, just uncommon this line and specify a temp folder path (e.g. c:\files\temp) and grand iis user write permission. This will automatically rewrite your Drupal site temp file folder to this location. It will fix the issue