-1

When I try to upload an image, image is not generating and I always get ajax error.

I cannot upload an image.

I get a 404 ajax error.

enter image description here

I use Drupal 8.54

php.ini:

memory_limit = 254M 
upload_max_filesize = 20M 
post_max_size = 20M 
max_execution_time = 90 

No error - Recent log messages.

The files directory ( sites/default/files ) permissions - 777

I don't find any solution or references about that.

Edit:

I can't upload file.

When I want to upload more than 8KB files, get ajax error.

5
  • Stock 8.54 image uploads work fine. Without telling us what custom & contrib modules you have installed, or what could be the likely cause of it, this question will probably end up getting closed as "Unclear what you're asking" or "Too broad".
    – Beebee
    Commented Jun 26, 2018 at 16:02
  • Generally image uploads work fine but in my case not. It is core image field ( field_image) Commented Jun 26, 2018 at 16:12
  • Any errors in the Watchdog (db logging) log? Also, what do your system error logs say? E.g. the PhP error log or web server error log.
    – CG Monroe
    Commented Jun 26, 2018 at 16:22
  • There is no error - db logging, server error log file... I made a short video youtu.be/PQcwu_tTj3s Commented Jun 26, 2018 at 17:16
  • Possibly related: drupal.stackexchange.com/q/144323/15055
    – leymannx
    Commented Aug 3, 2018 at 20:31

1 Answer 1

0

This part of the AJAX error message can be helpful for you:

the requested url /@custom was not found on this server

This may have the following root causes (including but not limited to):

  • .htaccess settings
  • Your settings.php
4
  • It happens when I try to upload an image more than 8-10 KB. I think - server side issues, not drupal cms issue. Commented Jun 27, 2018 at 13:24
  • This means: you have tested with the same image file on localhost and it worked fine?
    – ssibal
    Commented Jun 27, 2018 at 13:37
  • No, a remote server, I can upload an image 5KB but more than that - the AJAX error message. Commented Jun 28, 2018 at 4:51
  • Maybe you could update your answer with this information
    – ssibal
    Commented Jun 28, 2018 at 12:22

Your Answer

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

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