Open Fensterbank opened 8 years ago
Addition:
If I use $config['usb_disk'] = 'Generic-FlashDisk-01/';
the correct paths will be written to the uploaded phone book XML file, but uploading to FTP fails while trying to upload to Generic-FlashDisk-01//FRITZ/fonpix/
.
If I use $config['usb_disk'] = 'Generic-FlashDisk-01';
uploading to FTP is successful but incorrect paths will be written to the uploaded phone book XML file and the Fritzbox cannot show the pictures.
I don't see any case, where the profile picture upload would work with the current code...
The config example says following:
But in the script while setting the file path in the URL we find this line:
$person->addChild("imageURL", $this->config['fritzbox_path'] . $this->config['usb_disk'] . "FRITZ/fonpix/" . basename($photo_file));
If the
usb_disk
config value is used as proposed (without appending a "/"),imageURL
properties likefile:///var/media/ftp/Generic-FlashDisk-01FRITZ/fonpix/Foo_f1230.jpg
are generated, which cannot work.This should be fixed in code (I did not check if it's only an XML generation issue or if it affects also the file upload), but could break some existing configurations for users, if they appended an "/" to the config value manually.