Problem/Motivation
Thank you for this module. I'm trying to use it to import files. I've transferred the files to the server that I want to reference, created a file field, then the reference files from the csv file using a path like /sites/default/files/sub-directory/filename.pdf. It's not working. Is this the correct process -- do I need to FTP the files up first? If not, am I supposed to be referencing the file location on my local drive, and CSV Importer actually uploads the file for me? I'm able to import other field content successfully, but files aren't uploading.
Steps to reproduce
I attached my csv file. I changed the file extension to txt so I could upload it here, but I'm using a CSV file for the actual import.
Proposed resolution
I need help understanding the documentation a little better. The documentation noting /full/path/to/file is helpful, but I need to be sure that I should be pointing to the actual site using a relative path to the location where I've already uploaded the images (not my local machine), and I don't need http:// or https://domainname/... at the front of the path.
| Comment | File | Size | Author |
|---|---|---|---|
| import_test-2021-01-22-nocommas.txt | 475 bytes | marysalome |
Comments
Comment #2
marysalome commentedI figured this out and am posting the solution in case it's helpful to anyone else. Here's how I was able to reference files that were already in the Drupal webspace.
In localhost, I wrote my paths like this: C:\xampp\htdocs\domain\web\sites\default\files\slidesRus\homepage-hero_1.jpg
On Dev, I wrote my paths like this: sites/default/files/projects/logos/file.svg
Note that in the Dev path, there is no leading slash. The example on the module documentation includes a leading slash.
Hope this helps someone else!
Comment #3
marysalome commented