Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
corrected the archiving format
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidtz committed Aug 3, 2019
1 parent b5ade9a commit 7b4f467
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/orders/zip-deploy-python.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source:
zip: UEsDBAoAAAAAABRTA08AAAAAAAAAAAAAAAAHAAAAcHl0aG9uL1BLAwQKAAAAAAAUUwNP3W7joOAAAADgAAAAGAAAAHB5dGhvbi9jb3VudF90b190b3RhbC5weSMhL3Vzci9iaW4vZW52IHB5dGhvbgppbXBvcnQganNvbgoKd2l0aCBvcGVuKCdjb25maWcuanNvbicpIGFzIGNvbmZpZ19maWxlOgogICAgY29uZmlnID0ganNvbi5sb2FkKGNvbmZpZ19maWxlKQogICAgcHJpbnQgKCJsb2FkZWQgY29uZmlnIGZpbGU6ICVzIiAlIGNvbmZpZykKCmZvciBpIGluIHJhbmdlKDEsIGNvbmZpZ1sndG90YWwnXSsxKToKICAgIHByaW50KCJoZWxsbyAlZCIgJSAoaSkpUEsDBAoAAAAAABRTA0+qp6fkEAAAABAAAAASAAAAcHl0aG9uL2NvbmZpZy5qc29uewogICJ0b3RhbCI6IDMKfVBLAQIUAAoAAAAAABRTA08AAAAAAAAAAAAAAAAHAAAAAAAAAAAAEAAAAAAAAABweXRob24vUEsBAhQACgAAAAAAFFMDT91u46DgAAAA4AAAABgAAAAAAAAAAAAAAAAAJQAAAHB5dGhvbi9jb3VudF90b190b3RhbC5weVBLAQIUAAoAAAAAABRTA0+qp6fkEAAAABAAAAASAAAAAAAAAAAAAAAAADsBAABweXRob24vY29uZmlnLmpzb25QSwUGAAAAAAMAAwC7AAAAewEAAAAA
zip: UEsDBAoAAAAAAFJYA0/dbuOg4AAAAOAAAAARAAAAY291bnRfdG9fdG90YWwucHkjIS91c3IvYmluL2VudiBweXRob24KaW1wb3J0IGpzb24KCndpdGggb3BlbignY29uZmlnLmpzb24nKSBhcyBjb25maWdfZmlsZToKICAgIGNvbmZpZyA9IGpzb24ubG9hZChjb25maWdfZmlsZSkKICAgIHByaW50ICgibG9hZGVkIGNvbmZpZyBmaWxlOiAlcyIgJSBjb25maWcpCgpmb3IgaSBpbiByYW5nZSgxLCBjb25maWdbJ3RvdGFsJ10rMSk6CiAgICBwcmludCgiaGVsbG8gJWQiICUgKGkpKVBLAwQKAAAAAABSWANPqqen5BAAAAAQAAAACwAAAGNvbmZpZy5qc29uewogICJ0b3RhbCI6IDMKfVBLAQIUAAoAAAAAAFJYA0/dbuOg4AAAAOAAAAARAAAAAAAAAAAAAAAAAAAAAABjb3VudF90b190b3RhbC5weVBLAQIUAAoAAAAAAFJYA0+qp6fkEAAAABAAAAALAAAAAAAAAAAAAAAAAA8BAABjb25maWcuanNvblBLBQYAAAAAAgACAHgAAABIAQAAAAA=

deploy:
install:
Expand All @@ -8,7 +8,7 @@ deploy:

run:
commands:
- ./count_to_total
- ./count_to_total.py

target:
ids:
Expand Down
8 changes: 6 additions & 2 deletions examples/ui/file-reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// too many files may cause problems
console.log("Selected files:", files.length);

var archive = (new JSZip()).folder("archive");
var archive = new JSZip();
var pending = files.length;

for (var i = 0, f; f = files[i]; i++) {
Expand All @@ -36,7 +36,11 @@
// console.log("e:", e.target.result);
console.log("loaded:", file.webkitRelativePath);
// parent directory name is in the path
archive.file(file.webkitRelativePath, e.target.result)
// trim selected directory name
console.log(file.webkitRelativePath);
var path = file.webkitRelativePath.substring(file.webkitRelativePath.indexOf('/')+1)
archive.file(path, file);
console.log(path);

// count down and resolve promise
pending--;
Expand Down

0 comments on commit 7b4f467

Please sign in to comment.