Is it possible to harvest files from local directory and just add them into the database as drupal files?

I just want to upload files with ftp and attach them later to nodes with IMCE.

Thanks in advance

CommentFileSizeAuthor
#6 mm_nome.module.rej_.txt2.71 KBagrivas
#4 mm_node.diff3.4 KBarthurf

Comments

delykj’s picture

Yes, use the mm_dir module. Specify your import directory and store your harvested files as nodes.

agrivas’s picture

First of all thanks for the reply.

Isn't this going to create a node for each uploaded file?

I just want a record in the drupal "Files" table

arthurf’s picture

Yes, it will create a node for each harvested file. I'll create a new action in mm_node to do this.

arthurf’s picture

Status: Active » Needs review
StatusFileSize
new3.4 KB

Please try this diff

agrivas’s picture

Status: Needs review » Closed (fixed)

Thanks for the info!

agrivas’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new2.71 KB

Sorry but the patch failed to apply to the dev version. I attach the .rej file

arthurf’s picture

uuuhhhhh.... it pretty much rejected every change- can you try it with ignoring white space maybe?

agrivas’s picture

Better but still not enough. Only 5 changes were accepted. I can attach the rej file again if you want to. I tried to use the latest file from the cvs but I get the following error:

Fatal error: Cannot redeclare media_mover_api_rerun_node_form_submit() (previously declared in .../sites/all/modules/media_mover/contrib/mm_node/mm_node.module:872) in .../sites/all/modules/media_mover/media_mover_api.module on line 3214

maybe you touched other files too

Pratik’s picture

Title: Help with the simplest type of harvesting » Help with Media Mover module

Media mover module not working.After running the configuration, I get an warning message saying 'Parameter 4 to mm_dir_media_mover() expected to be a reference,value given in /includes/modules.inc on line 462' and the files are not harvested from the local directory and stored to the FTP Server.This is an issue I face after setting the configurations.

arthurf’s picture

@agrivas - I think your checkout is bad. That function is not declared on #827 in mm_node....

scottrigby’s picture

@arthurf i would give it a shot, but i'm also having trouble applying the patch cleanly

arthurf’s picture

Patch was against my local sandbox, sorry. Just committed fixed code to dev, please review.