Answers.Body: <p>I do not know, how this ever worked. Webform module checks for the schemed directory path always, even if - like in this case - the streamwrapper is mapped to an external API and not to the local filesystem.</p>
  <p>So changing</p>
  <pre><code>public function mkdir($uri, $mode, $options) {
      return FALSE;
  }
  </code></pre>
  <p>to</p>
  <pre><code>public function mkdir($uri, $mode, $options) {
      return TRUE;
  }
  </code></pre>
  <p>in <code>cmrf_form_processor_stream_wrapper.inc</code> fixes the issue.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-02T19:00:15.723Z
Answers.LastActivityDate: 2021-09-02T19:00:15.723Z
Answers.UserDisplayName: nielo
Body: <p>Gurus out there, I get an error adding a file upload field in drupal 7 webforms, when enabling the &quot;Form Processor File Url&quot; wrapper, something like &quot;Directory cmrfformprocessor://webform/my-name could not be created. Please make sure directory is writable&quot;.</p>
  <p>I tried to create every directory combination under sites/default/files, but nothing helped. Made sites/ writable for apache-user recursively but no luck. Read the civimrf and cmrf_form_processor source code without getting a clue.</p>
  <p>Could you help me out?</p>
  <p>Drupal, all modules and CiviCRM are current stable versions.</p>
  
Tags: <drupal><drupal-7><form-processor>
Title: CiviMRF, Drupal 7, Webforms: Form Processor File Url could not be created
ThreadText: # CiviMRF, Drupal 7, Webforms: Form Processor File Url could not be created
  
  (Asked by: username_0 on 2021-08-28)
  
  Gurus out there, I get an error adding a file upload field in drupal 7 webforms, when enabling the "Form Processor File Url" wrapper, something like "Directory cmrfformprocessor://webform/my-name could not be created. Please make sure directory is writable".
  
  I tried to create every directory combination under sites/default/files, but nothing helped. Made sites/ writable for apache-user recursively but no luck. Read the civimrf and cmrf\_form\_processor source code without getting a clue.
  
  Could you help me out?
  
  Drupal, all modules and CiviCRM are current stable versions.
  
  **Tags:** drupal, drupal-7, form-processor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-09-02. Score: 0 | Accepted answer
  
  I do not know, how this ever worked. Webform module checks for the schemed directory path always, even if - like in this case - the streamwrapper is mapped to an external API and not to the local filesystem.
  So changing
  public function mkdir($uri, $mode, $options) {
      return FALSE;
  }
  
  to
  public function mkdir($uri, $mode, $options) {
      return TRUE;
  }
  
  in cmrf_form_processor_stream_wrapper.inc fixes the issue.
  
  
  ---
  
  