OneOffTech / laravel-tus-upload

A package for handling resumable file uploads in a Laravel application via the http://tus.io/ resumable file upload protocol.
https://oneofftech.xyz/open-source/
MIT License
50 stars 13 forks source link

Getting pre-create hook failed: exec: on Windows 10 with linux subsystem #38

Closed jonathantyar closed 3 years ago

jonathantyar commented 3 years ago

Hey! it's a nice package, so i am trying to using this package on windows 10 with linux subsystem on it and getting this error messages

ERROR output -----------------
[tusd] 2020/12/04 10:56:37 event="HookInvocationError" type="pre-create" id="" error="exec: "D:\\Projects\\klinik_derla\\vendor\\oneofftech\\laravel-tus-upload\\hooks\\win\\pre-create": file does not exist"

Trying to solve this by googling and found this issue on tusd https://github.com/tus/tusd/issues/267

avvertix commented 3 years ago

Looking at the log line you posted, an in particular at

D:\\Projects\\klinik_derla\\vendor\\oneofftech\\laravel-tus-upload\\hooks\\win\\pre-create

seems that you are running the tus server, i.e. php artisan tus:start, under Windows and not from the bash of the Linux distribution of your choice on the WSL. I'm saying so because there is a win in the path instead of linux so this means that PHP recognized Windows as the operating system.

We provide only hooks as bash script under vendor/oneofftech/laravel-tus-upload/hooks/linux.

Considering that you state that on production you will use Fedora there is no change in the configuration you should perform. On your development environment you should all your command from within the bash shell available on the linux distribution inside the WSL and not from the PowerShell or the command prompt.

jonathantyar commented 3 years ago

Right! thank you for your response! running tus server under WSL works well for me!