fortunen / cordova-plugin-zeep Goto Github PK
View Code? Open in Web Editor NEWZip compression/decompression for the cordova/phonegap platform
License: Apache License 2.0
Zip compression/decompression for the cordova/phonegap platform
License: Apache License 2.0
While zipping/unzipping the file it says zip error: failed while locating : test ({"code":5}) May I know why does it show me this !!
The plugin works fine on iOS11 for files sized a couple of MB up to a few dozen MB.
However the errorCallback is called immediately when the app tries to unzip a file that is 2.8 GB big using the same code like the one for the smaller files.
Is there some sort of limitation on how big a zip file can be?
hey,guy。i put ngCordova.plugins.zeep in App.js file like that:
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services','ngCordova','ngCordova.plugins.zeep']).
That will appear error.
ncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module ngCordova.plugins.zeep due to:
Error: [$injector:nomod] Module 'ngCordova.plugins.zeep' is not available!
Thanks for creating the plugin!
However, it seems its not correct when unzipping binary files.
I tried creating a random file, and when comparing the original file with the unzipped version the files are different!
Since I could not find any examples online this is how the test file was created:
dd if=/dev/urandom bs=100k count=1 of=random.raw; zip test.zip random.raw
I can also provide the test files I used if that's easier for you.
Thanks!
from: ms-appdata:///local/LOCALSTORAGE_BACKUP.bak
to: ms-appdata:///local/demo/
On android, this 'demo' folder is created upon unzip if it doesn't exist + .bak file contents are unzipped there correctly. On windows (Windows 10, UWP) it is created but it remains empty, meaning no files were actually unzipped from the .bak archive into the destination folder.
More weirdness: I tried this as output: ms-appdata:///local/demo/data.json, I knew it wouldn't work since it is by definition just asking for the folder path where to extract. To my surprise it created data.json folder and it did contain the extracted files.
Something weird going on there, I'm quite sure about that. I'm using cordova-plugin-file and cordova-plugin-zeep both. Everything works on android, nearly everything works on windows (unzip is only thing that has problems AFAIK).
Good job on the plugin so far! (y)
I'm not clear on how this plugin supposed to work but it clearly fails to extract the zip. Here is my code;
download: function(){
app.downloadZip('1535',
function _onProgress(fileDownloader) {
console.log('Progress: ', fileDownloader);
/*
var downloadProgress = parseFloat(fileDownloader.downloadProgress);
downloadProgress = Math.round(downloadProgress * 100);
console.log('Progress: ', downloadProgress);
*/
},
function _onSuccess(entry) {
console.log('Entry: ', entry);
presenter.fileSystem.createDirectory(config.appDirName + '/1535',
function __onSuccess() {
console.log('Done!');
app.extract(entry);
},
function __onError(error) {
onError(error);
}
);
},
function _onAbort() {
},
function _onError(error) {
console.log('error: ', error);
}
);
},
downloadZip: function(zip, onProgress, onSuccess, onAbort, onError) {
var url = 'http://companyapp.co.uk/1535.zip';
app.fileDownloader.remoteURL = url;
app.fileDownloader.localFilePath = config.appDirName + '/' + '1535.zip';
app.fileDownloader.bytesToDownload = '2435379';
app.fileDownloader.download(options = { trustAllHosts: true},
function _onProgress() {
onProgress(presenter.fileDownloader);
},
function _onSuccess(zip) {
onSuccess(zip);
},
function _onAbort() {
onAbort();
},
function _onError(error) {
onError(error);
}
);
}
extract: function(entry){
var zip = entry.nativeURL;
var extracted = entry.name.split('.');
extracted = extracted['0'];
var fs = presenter.fileSystem.getFS();
fs.root.getDirectory(config.appDirName + '/' + extracted, { create: false },
function(presFolder){
console.log(presFolder);
Zeep.unzip({
from : zip,
to : presFolder.nativeURL
}, function(e) {
console.log('success: ', e);
// print out: success: OK
}, function(e) {
console.log('error: ', e);
});
},
function(e){
console.log(e)
}
);
},
Instead of zipping up the entire folder how can we pass a single file name?
I need to be able to compress a file and also a string I have in memory. Looking for a plugin that can do both.
Xcode is throwing several warnings related to code depreciation.
Xcode version used is 8.3.1
I need an example like this, but using ionic 3, importing with ts e etc:
app = angular.module('MyApp', ['ngCordova.plugins.zeep'])
app.controller('MyController', function($scope, $cordovaZeep) {
var source = cordova.file.applicationDirectory,
zip = cordova.file.cacheDirectory + 'source.zip',
extracted = cordova.file.cacheDirectory + 'extracted';
console.log('source : ' + source );
console.log('zip : ' + zip );
console.log('extracted : ' + extracted);
console.log('zipping ...');
$cordovaZeep.zip({
from : source,
to : zip
}).then(function() {
console.log('zip success!');
console.log('unzipping ...');
$cordovaZeep.unzip({
from : zip,
to : extracted
}).then(function() {
console.log('unzip success!');
}, function(e) {
console.log('unzip error: ', e);
});
}, function(e) {
console.log('zip error: ', e);
});
});
The plugin doesn't compile in iOS 11. My workaround was to replace the current version of SSZipArchive the latest version of the library from https://github.com/ZipArchive/ZipArchive.
HI, I am getting the following error when calling zeep.unzip in an android cordova application:
/data/user/0/com.testApp.test/cache/1.0.0.0/www/test/test.html: open failed: ENOTDIR (Not a directory)"
I've been able to use this on an emulator with no problem. However, when attempting to use it on a physical Samsung Galaxy Tab3 I get the above exception message.
Any idea, what would cause this or how to work around it?
Hi Team,
I need to generate one zip file containing multiple pdf file and one text file.
Is it possible to achieve same using this plugin.?
If yes, how can I achieve this.
Compared to iOS, it's ~4-5 times slower on Android.
Without password, the difference is not noticeable. Any way this could be improved ?
We forked it to allow the password param ( https://github.com/vlinde/cordova-plugin-zeep )
Thanks in advance.
ITMS-90338: Non-public API usage - The app references non-public selectors in ***: _setAlwaysRunsAtForegroundPriority:, zipArchiveDidUnzipFileAtIndex:totalFiles:archivePath:unzippedFilePath:, zipArchiveProgressEvent:total:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
** BUILD FAILED **
The following build commands failed:
CompileC /Users/user13/Library/Developer/Xcode/DerivedData/RAFX-gxtuhbgatrmuldfktgoiriftpbnn/Build/Intermediates.noindex/RAFX.build/Debug-iphonesimulator/RAFX.build/Objects-normal/x86_64/FiNeZeep.o RAFX/Plugins/cordova-plugin-zeep/FiNeZeep.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user13/Desktop/RAFX-A/RAFX/platforms/ios/cordova/build-debug.xcconfig,-workspace,RAFX.xcworkspace,-scheme,RAFX,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/user13/Desktop/RAFX-A/RAFX/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/user13/Desktop/RAFX-A/RAFX/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code 1).
Plugins:
cordova-clipboard 1.1.1 "Clipboard"
cordova-plugin-camera 4.0.1 "Camera"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.0.2 "FilePath"
cordova-plugin-filepicker 1.1.4 "File Picker"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-ionic 4.1.3 "IonicCordova"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.2.1 "SocialSharing"
cordova-plugin-zeep 0.0.4 "Zeep"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
Can you help, please? Maybe this related with cordova-plugin-ionic?
Trying to unzip with password a external generated zip with password gives the next error:
unzip error: encrypted ZIP entry not supported
I also try with a MacOSX zip file with password and gives the same error.
Hi, Raj here. I didn't know how to approach this team so raising this as an issue though it is not. I have added windows 10 functionality to this plugin, modifying the FineZeep portable CS project to a UWP extension. I know there are lot of people out there looking to compress/decompress files in cordova apps on Windows10. Please let me know how I can contribute.
BTW, i removed the dependency on CSharpZipLib. Using UWP IO Compression features.
At least in the windows version it seems you can't extract into the same directory as where the zip file is ?
In my case it would make more sense than having a new directory for unzipped files.
Thanks
Configure project :
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2mypztukcdnygbbz3tlgc3s5n.run(D:\Projects\EpmUserAppSvn\trunk\EpmAppCode\EpmUserApp\platforms\android\build.gradle:139)
Configure project :CordovaLib
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Error message in console:
unzip failed: /data/user/0/com.tinkamo.tinkamoapp/files/play/gear_box/assets/7-tn.png (Not a directory)
I checked the folder with Android Studio's Device File Explorer and found the folders are not folders but some files with question marks, as shown below.
I created the ZIP file using Mac OS X. Is there a compatibility issue of unzipping Mac-created zip on Android? Any one has the same issue?
In android mobile, invoking zeep.unzip method is throwing error as "Open failed: ENOTDir (Not a directory)"
In android, I have a zip file containing the following structure
--- testFile.zip
------------ testFolder
--------------------- test.png
i.e. any file it can be a .txt or .png file inside a folder and zip this folder.
While trying to unzip this folder, Not a directory error is thrown.
But ios works fine.
Why this issue occurs ?
Hello!
Thx for the plugin. I need to unzip my file using a password. Can I do with your plugin? Whats the command to do "if i can"?
Thx Again!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.