Hi
I've been using ecommerce package with ec_file module, now I resigned from it and I wanna files simply to be attached to the nodes via upload.module.

I have about 700 "product" type nodes and 'ec_product_file' table with such a structure:

===============================
  nid  |  fpath    |  size  |
===============================
  12   |  abc.zip  | 123456 |  
-------------------------------
  14   |  efg.zip  | 456878 |  
-------------------------------

So in fact all of the files are still attached into the nodes, but the question is how to port them to the 'files' table, which has complete different structure (I can't see "nid" row)?

Files table for comparison:

=====================================================================================================
  fid  |  uid  |  filename  |  filepath       |  filemime     |  filesize  |  status  |  timestamp  |
=====================================================================================================
   1   |   3   |  abc.jpg   |  files/abc.jpg  |  image/pjpeg  |   1234     |    1     |     0       |
-----------------------------------------------------------------------------------------------------
   2   |   3   |  xyz.gif   |  files/xyz.gif  |  image/gif    |   7896     |    1     |     0       |
-----------------------------------------------------------------------------------------------------

I assume there must be somewhere row with nid's of nodes with attached files but in which table it is? In drupal 4.7 there was nid row but now it dissapeared.

Comments

v8powerage’s picture

Anyone has any idea on how to do that?