Unable to add SFTP account.
You cannot upload images when external storage is enabled as FTP, but when it is disabled, uploading works.
Uploading works fine when I manually create the missing FTP folder.
▶ Reproduction steps
1. Unable to add SFTP account. ** errorId #689fe2478836a1d8 **
2. Can't upload image. ** errorId #1e523e1342560076 **
📃 Error log message
1 SFTP ** errorId #689fe2478836a1d8 **
2. FTP ** errorId #1e523e1342560076 **
You cannot upload images when external storage is enabled as FTP, but when it is disabled, uploading works.
Uploading works fine when I manually create the missing FTP folder.
▶ Reproduction steps
- Try to add SFTP storage.
- Upload image when external storage is enabled as FTP.
1. Unable to add SFTP account. ** errorId #689fe2478836a1d8 **
2. Can't upload image. ** errorId #1e523e1342560076 **
📃 Error log message
1 SFTP ** errorId #689fe2478836a1d8 **
Got error 'PHP message: \nAw, snap! Internal Server Error [debug @ error_log] - https://v3-docs.chevereto.com/setup/troubleshoot/debug.html
** errorId #689fe2478836a1d8 **
CHV\\SftpException [300]: Can't change dir '/www/test/' in CHV\\Sftp::chdir\nAt /app/lib/classes/class.sftp.php:76\n\n
Stack trace:\n
#0 /app/lib/classes/class.sftp.php(59): CHV\\Sftp->chdir()\n
#1 /app/lib/classes/class.storage.php(592): CHV\\Sftp->__construct()\n
#2 /app/lib/classes/class.storage.php(169): CHV\\Storage::requireAPI()\n
#3 /app/lib/classes/class.storage.php(415): CHV\\Storage::uploadFiles()\n
#4 /app/lib/classes/class.storage.php(508): CHV\\Storage::test()\n
#5 /app/routes/route.json.php(681): CHV\\Storage::update()\n
#6 /lib/G/classes/class.handler.php(230): G\\Handler->{closure}()\n
#7 /lib/G/classes/class.handler.php(130): G\\Handler->processRequest()\n
#8 /app/web.php(411): G\\Handler->__construct()\n
#9 /app/loader.php(230): require_once('/app/web.php')\n
#10 /index.php(20): include_once('/app/loader.php')\n',
referer: https://nfhost.me/dashboard/settings/external-storage
2. FTP ** errorId #1e523e1342560076 **
Got error 'PHP message:
Aw, snap! Internal Server Error [debug @ error_log] - https://v3-docs.chevereto.com/setup/troubleshoot/debug.html
** errorId #1e523e1342560076 **
ErrorException [0]: ftp_chdir(): Can't change directory to /www/images/2021/06/02/: No such file or directory
At /app/lib/classes/class.ftp.php:130
Stack trace:
#0 unknown file(unknown line): G\\errorsAsExceptions()
#1 /app/lib/classes/class.ftp.php(130): ftp_chdir()
#2 /app/lib/classes/class.storage.php(258): CHV\\Ftp->mkdirRecursive()
#3 /app/lib/classes/class.image.php(869): CHV\\Storage::uploadFiles()
#4 /app/routes/route.json.php(88): CHV\\Image::uploadToWebsite()
#5 /lib/G/classes/class.handler.php(230): G\\Handler->{closure}()
#6 /lib/G/classes/class.handler.php(130): G\\Handler->processRequest()
#7 /app/web.php(411): G\\Handler->__construct()
#8 /app/loader.php(230): require_once('/app/web.php')
#9 /index.php(20): include_once('/app/loader.php')\n',
referer: https://nfhost.me/