title: October CMS How to Change Path of File Upload?
body: <p>I'm using October CMS.</p>
  
  <p>I made a simple front-end File Upload Plugin. I have a Model and Component.</p>
  
  <p><a href="https://i.stack.imgur.com/TKrUe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKrUe.png" alt="upload form"></a></p>
  
  <p><strong>In Model Uploader.php I use</strong></p>
  
  <pre><code>public $attachOne = [
      'videofile' =&gt; 'System\Models\File'
  ];
  </code></pre>
  
  <p><strong>And in the Component</strong></p>
  
  <pre><code>public function onUpload(){
      $uploader = new Uploader();
      $uploader-&gt;videofile = Input::file('videofile');
      $uploader-&gt;save();
      Flash::success('File Uploaded');
      return Redirect::back();
  }
  </code></pre>
  
  <p><strong>By default, Uploads go to</strong> </p>
  
  <pre><code>/storage/app/uploads/public/random-dir/random-name.mp4
  </code></pre>
  
  <p>The CMS is giving the files a random directory and name.</p>
  
  <p><strong>But backend <em>Media</em> Uploads go to</strong> </p>
  
  <pre><code>/storage/app/media/filename.mp4
  </code></pre>
  
  <p>The File name is preserved.</p>
  
  <p>How do I make the files upload to /media instead of /uploads/public? </p>
  
  <p>Or is it possible to define a folder and filename instead of random in /uploads/public?</p>