3

Cannot upload files with Assets v2.0.5 in ExpressionEngine v2.5.5.

  1. Files uploaded with native EE file manager works.
  2. Directory permissions for upload directory is 777 (for troubleshooting sake).
  3. XSS filtering on uploads is DISABLED per config file and db settings.
  4. Action # 38 in database is upload_file method.

  5. Uploading files using assets results in the following error:

    There was an error uploading your file: Your file could not be saved. Either the upload was cancelled, or there was a server error.

Header/response information from the request below:

Request URL:http://website.com/?folder=2&ACT=38&qqfile=small_image.jpg
Request Method:POST 
Status Code:200 OK 

Request Headers:

Accept:*/* 
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 
Accept-Encoding:gzip,deflate,sdch 
Accept-Language:en-US,en;q=0.8 
Cache-Control:no-cache 
Connection:keep-alive 
Content-Length:5750 
Content-Type:application/octet-stream 
Cookie:exp_perpage=150; exp_last_visit=1361303427; exp_last_visit=1361303427; exp_last_activity=1361319620; exp_last_activity=1361319626; exp_sessionid=44b2b994fb6c7f4e0960bb746fdf415e3e01daa6; exp_expiration=1392855796; exp_sessionid=44b2b994fb6c7f4e0960bb746fdf415e3e01daa6; exp_expiration=1392856008; arp_scroll_position=0 
Host:website.com 
Origin:http://website.com 
Pragma:no-cache 
Referer:http://website.com/system/index.php?S... 
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17 
X-File-Name:small_image.jpg 
X-Requested-With:XMLHttpRequest 

Response Headers:

Connection:Keep-Alive 
Content-Encoding:gzip 
Content-Length:122 
Content-Type:text/html; charset=utf-8 
Date:Wed, 20 Feb 2013 00:26:57 GMT 
Keep-Alive:timeout=5, max=99 
Server:Apache 
Set-Cookie:exp_sessionid=44b2b994fb6c7f4e0960bb746fdf415e3e01daa6; expires=Wed, 20-Feb-2013 02:26:57 GMT; path=/ 
Set-Cookie:exp_expiration=1392856017; expires=Thu, 20-Feb-2014 00:26:57 GMT; path=/ 
Vary:Accept-Encoding
3
  • 1
    Jarrett, can you make sure that /system/expressionengine/cache is set to 777 permissions? We've seen that play a part in Assets uploading issues. Also, have you checked your server error logs for error reports?
    – Lisa
    Feb 20, 2013 at 19:02
  • Updated system cache path to be 777 and no success. Unfortunately I don't have access to the Apache logs.
    – JBB
    Feb 20, 2013 at 19:24
  • I recursed that directory and that fixed it. Thank you Lisa!
    – JBB
    Feb 20, 2013 at 19:48

2 Answers 2

8

The solution was to recurse 777 to the /system/expressionengine/cache/ directory as there are thumb directories that Assets creates to hold thumbnails, etc.

Thank you Lisa Wess (from Pixel & Tonic) for the solution!

1
  • My pleasure, Jarrett. Glad that solved it!
    – Lisa
    Feb 20, 2013 at 20:45
0

So I ran into this issue again and a recursive 777 on the /system/expressionengine/cache folder wouldn't cut it. Anyhow this was the issue/solution:

I was setting a custom cache path in my config.php:

$config['cache_path'] = FCPATH.'cache/sql/';

and despite that path having the proper permissions, I could not get my files to upload using the Assets add-on. I resolved the issue by simply letting Assets use the default cache path by commenting out my custom cache_path in my config.php file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.