My remote server has this structure (Laravel app):
- laravel
----app
----bootstrap
----(etc.)
- public_html
----js
----css
----index.php
----(etc)
BUT, my local structure is laravel's default structure
---app
---bootstrap
---(etc)
---**public** (remote's public_html)
So, I have two FTP users. One is "laravel" and its remote root folder is "laravel". The other is "public" and its remote folder is "public_html".
When I upload with "laravel" user, I don't have any problem, but when I upload a file with "public" user, the file is uploading in "public_html/public/whatever-file". This is because my local and remote structure are not exactly the same.
How can I say to sftp-config.json when I upload a file to public_html, "removes" the "public" name to the uploaded directory? That way it will save correctly.
Thx.
Based on your comments, the best solution would be to make your local filesystem match the remote filesystem, with two directories: laravel
and public_html
. Since you don't have access to their parent directory on your shared server, you'll need to then set up two SFTP servers in Sublime, one pointing to public_html
and the other to laravel
. This way, you don't need to worry about hacking SFTP to rewrite file paths, something which I don't think is possible anyway as it is not open-source.