3

I import a csv-file via Feeds-module and got stuck with the images for a node. All the other fields are importet as wanted, except the path for the image-field. The images are already uploaded to the directory below...

An example for a row value of a path: sites/all/default/files/images/name.JPG

After the import, the image field is just empty:

enter image description here

Any help would be highly appreciated! Thanks in advance...

2 Answers 2

7

You need to specify the full HTTP path. It's possible that something like a file schema might work (public://images/name.JPG), but in my extensive use with Feeds we import file fields (mostly images but also mp3, pdf, etc) by specifying the full HTTP path that the file can be found at, e.g.: http://example.com/sites/default/files/images/name.JPG.

10
  • Not working here. I don't know where the glitch is on my side. I tried several times, with and without the http:, tried other field types (file) ...but no luck. Any idea how to debug this? The other fields are working... it must be something really stupid that I'm overlooking.
    – Volker
    Commented Nov 15, 2012 at 20:38
  • 1
    Are you positive that your server can wget the URL you have specified in the cell? Are you seeing any errors? Turn on debugging for the feed importer and check the feed importer's log. Commented Nov 15, 2012 at 20:42
  • 2
    Have you checked the permissions for the Images folder? I have done many image imports successfully with the format public://images/subfolder/imagename.jpg. Also, check your path. In your post you state "sites/all/default/files" which is unusual (and perhaps just a typo here). Default is "sites/default/files"
    – keva
    Commented Nov 15, 2012 at 20:49
  • 2
    Yay! I finally got it workin'! After checking everything again and again i found the bastard in the csv itself. I use tabs as separators and somehow i got an extra tab before the path... gnarl ;) Thanks a lot for your hints and help. I learned something...
    – Volker
    Commented Nov 16, 2012 at 8:07
  • 2
    confirming that drupal file system paths (public://dir/image.jpg) work fine
    – doub1ejack
    Commented Mar 14, 2014 at 17:23
0

For local path, what worked for me was putting the file under sites/default/files of the drupal project it is in. The value of import file would public://filename.ext

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.