vschavala's avatar

upload file out of the project

can i upload the file out of the project instead of public folder in laravel

0 likes
7 replies
martinbean's avatar

@vschavala You really need to put a bit more effort into your questions.

This is the second, one-sentence question you posted where it’s not clear what you’re asking. You need to give us more information.

vschavala's avatar

@martibean i have two different frameworks(front-end and back-end) i want to upload a file out of my project folder and access through another framework like word press

Snapey's avatar

Once the file is uploaded you can put it wherever you like on your server provided the web server account has the right permissions.

RamjithAp's avatar

@vschavala Try this, For example, your laravel project at ../xxx/laravel/public and another project at ../yyy/files now, go to your laravel file uploading controller and do:

// ../xxx/laravel/app/controllers/fileUploadController.php
public function uploadFile($request){
$file = Input::file('upload');
$file_name = $file->getClientOriginalName();
$file->move('/yyy/files/', $file_name);
return "Upload successful!";
}

Please or to participate in this conversation.