NPC
NPC

Reputation: 1039

How to attach local files to Drupal nodes

I need to attach video files to nodes in Drupal 6, yet the AJAX uploader fails (the dreaded HTTP error 0), and anything I tried to debug it didn't help (may be moving to Drupal 7 will, but that's still going to be some time). Is it possible to somehow upload the file to the server via FTP, and then simply attach it to a node, so that it is linked in the same way that it would be linked after a regular file attachment?

This is not about CCK's FileField. This is about the "vanilla" node attachments. To do the same for FileField uploads I used FileField Sources module, and I'd like to find a similar solution for the node attachments.

Upvotes: 0

Views: 1664

Answers (3)

NPC
NPC

Reputation: 1039

Since I couldn't find a solution, I had to switch to using CCK FileField, and use FileField Sources module (http://drupal.org/project/filefield_sources) to upload files to the server and then attach them to the field.

Thanks for trying to help me, guys!

Upvotes: 1

Grayside
Grayside

Reputation: 4194

I believe I had something like this problem when I configured a site to run over SSL but not all the URLs in the system were being properly adjusted or redirected. I set the $base_url variable in settings.php to use https://www.example.com` and the error stopped.

In my case I believe it related to a Taxonomy tagging autocomplete callback, but all Ajax callbacks in the system can be sensitive on this point.

#646694 AJAX: Terrible reporting of status 0 response from AJAX request ("HTTP Error 0 has occurred")

Upvotes: 1

Igor Rodinov
Igor Rodinov

Reputation: 471

your problem is in limit upload file size.

  1. check it is in php.ini settings
  2. do not forget that max package size limits upload size too
  3. check drupal settings (drupal file system settings or filefield settings)

Upvotes: 1

Related Questions