Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip upload bugs #119

Open
Neon4eg opened this issue Jul 6, 2011 · 1 comment
Open

Zip upload bugs #119

Neon4eg opened this issue Jul 6, 2011 · 1 comment
Labels

Comments

@Neon4eg
Copy link

Neon4eg commented Jul 6, 2011

If I have some images in album then upload new zip archive with images, old images are being reindexed and renamed (filenames too). Cache is not been cleared so you can see not existing images in album as existing until clear thumb cache.

@ice-beam
Copy link

I think the problem is that import script unpacks zip file into album directory. I've fixed it this way:
0) create folder called 'zip' in assets/components/gallery/files with access rights 777

  1. create variable for unpack directory in core/components/gallery/model/gallery/import/galzipimport.class.php
    protected $unpackDir;
  2. set this variable in the beginning of function run()
    $this->unpackDir = $this->modx->getOption('gallery.files_path').'zip/';
  3. use this variable when iterating over unzipped files
    foreach (new DirectoryIterator($this->unpackDir) as $dir)
  4. use it for unzipping in function unpack()

$archive->unpack($this->unpackDir)
and it all started working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants