0

I want to be able to put content from github into the sites/default/files folder of drupal so I was wondering if there was a way to do this.

  • Why exactly would you want to do this? Is it a Library that you are needing? If so you need to look into the Library API to do it the correct way. But I'm still interested in knowing the reasoning if that's not what you in fact want to do. – burnsjeremy Jul 15 '15 at 17:31
  • i want to use the import_html module to import sites but as far as I know i can only do that by moving my html files to that folder and periodically the github repo may have new html items added to it or modified. so i need to move files from github to this folder periodically – Angie Jul 15 '15 at 20:38
  • So you should be able to bypass the sites/default/files folder then. That probably shouldn't be used since you are going to be importing html and turning them into nodes with the import_html module. You could just create a folder on the server (could be outside your Drupal path or inside it but probably would be best outside) and clone the repo (use git to update when it needs to update) and configure that path in the html_import module. I mean you could make it anywhere you want but I would advise against using sites/default/files since that folder is unprotected and could open security risk – burnsjeremy Jul 15 '15 at 20:44
0

I made my own module. You can see part of the code here. I put that code on a cron_hook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.