Uploading a png works, but trying to download it again doesn't. I am not sure what the issue is. Certainly writing the response as a binary file is not correct. The 29k png becomes a 29M file... maybe the data has already been interpreted by matlab? Do I need to know what the file is? how do I get that information?
laOptions.notebook = 'Test 1';
laOptions.folder = datestr(now,'yyyy');
laOptions.page = datestr(now,'yyyy-mm-dd');
laOptions.use_template = false;
LA = labarchivesCallObj(laOptions)
%% test upload
LA = LA.addAttachment('aFigure.png')
LA = LA.loadEntriesForPage;
LA = LA.dispEntriesForPage;
owd = pwd
%% test download (NOT WORKING)
cd test_downloads
LA = LA.downloadAttachments('aFigure.png');
cd(owd)
% see if it is a png or not
Doing the same with a mat file seems ok
LA = LA.addAttachment('aTesty.mat')
LA = LA.loadEntriesForPage;
LA = LA.dispEntriesForPage;
%% test download
cd('test_downloads')
LA = LA.downloadAttachments('aTesty.mat');
cd(owd)
mm = load('test_downloads/aTesty.mat')
% should return:
% mm =
%
% struct with fields:
%
% atchOptions: [1×1 struct]
Uploading a png works, but trying to download it again doesn't. I am not sure what the issue is. Certainly writing the response as a binary file is not correct. The 29k png becomes a 29M file... maybe the data has already been interpreted by matlab? Do I need to know what the file is? how do I get that information?
Doing the same with a mat file seems ok