ioBroker.admin icon indicating copy to clipboard operation
ioBroker.admin copied to clipboard

socket.io function writeDirAsZip

Open sbormann opened this issue 4 years ago • 2 comments

Hi,

i want to use the writeDirAsZip-function of socket.io, but it does not work. I saw here: https://github.com/ioBroker/ioBroker.admin/blob/072da76e81271454ed8a819a7fdee0d2683ff9be/lib/socket.js#L1040 that it needs extra permissions.

Is there any chance to get this working? I wanted to provide someting like "design-packs" for iQontrol, which are meant to be zip-files with icons, images and design-settings in json-format, that the user should be able to upload.

sbormann avatar Aug 24 '21 22:08 sbormann

Please retry with Admin 6 and new web

GermanBluefox avatar Jun 09 '22 18:06 GermanBluefox

Hi, sorry for delay, it is still not working. The call

socket.emit('sendToHost', common.host, 'writeDirAsZip', {id: 'iqontrol.meta', name: path, data: base64Zip}, function(data){
	callback(data.error || null, null);
});

returns ERR_INVALID_ARG_TYPE

common.host is "raspberrypi" path is for example "/userfiles/"

Can you please give me a short example how to use writeDirAsZip??

sbormann avatar Nov 21 '22 22:11 sbormann