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

Please help get move to archive working #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miraaz
Copy link
Contributor

@miraaz miraaz commented Mar 22, 2016

I send here some files.

  1. Make in webserver root "archive" folder.
  2. Put my files in your webserver root.
  3. Please help get working move marked videoas into media->archive.
  4. Sorry i do not know how program PHP. Houpe you can help.

I send here some files. 
1. Make in webserver root "archive" folder.
2. Put my files in your webserver root.
3. Please help get working move marked videoas into media->archive.
4. Sorry i do not know how program PHP. Houpe you can help.
@miraaz
Copy link
Contributor Author

miraaz commented Mar 22, 2016

case 'sendArchive': if(!empty($_POST['check_list'])) { foreach($_POST['check_list'] as $check) { rename($check, "ARCHIVE_PATH/"); //rename("user/image1.jpg", "user/del/image1.jpg"); } } maintainFolders(MEDIA_PATH, false, false); break;

@miraaz
Copy link
Contributor Author

miraaz commented Mar 22, 2016

Whatever i try i get always

PHP Warning: rename(vi_0001_20160322_174140.mp4.v0001.th.jpg,archive): No such file or directory in /var/www/html/rpicam/preview.php on line 128, referer:

but i have that archive folder in webroot!

@randuhmm
Copy link

Hello, are you still interested in getting this feature working? I have a similar desire to automatically "archive" files that are older than a specified number of days. I would like to have a scheduled task to move these files to an "archive" directory, which will really be a remote file system, to save space on my Pi filesystem. I would also like to allow the browsing of these files, using the preview.php code. I have evaluated using the preview.php file to collect both files in the "media" directory as well as the "archive" directory, but the extensive use of the MEDIA define seems to create a problem there. It will require some overhaul on the preview.php page to get this working, but here's what I am going to propose for a feature-add:

  1. Add an "auto-archive" feature in the settings that will move files from the "media" directory to another directory as well as allow the browsing of files in the archive.
  2. The destination directory shall be configurable.
  3. The moving of files shall be configurable at a specified interval (daily, weekly, prob using cron format) and for files that are older than a specified delta (N days or N hours).
  4. If the "auto-archive" feature is enabled, the preview.php page should have functionality to manually "archive" a file.
  5. If the "auto-archive" feature is enabled, the preview.php page should have toggle button to show files from the "archive" in addition to the "media" location.

So far, these are the primary features I have in mind, but I don't see this really being too difficult to implement in a week or two. PHP is no longer my primary language, but I am sure I can get familiar with it again to implement this feature. Any thoughts?

@roberttidey
Copy link
Collaborator

You might want to consider extending the purge facility in the scheduler so that it has an option to move to archive rather than delete them. This would mean the purge settings would be applicable for archival purposes. E.g. have a scheduler setting for archive root and if active then use that.

If you archive the thumbnails as well as the actual media files then that may make it easier and faster to allow preview.php to display these, as the it would mean just having a selector for the root of preview.

@randuhmm
Copy link

@roberttidey - Thanks for the excellent feedback! I think adding the archive feature to the existing purge functionality makes a lot of sense. I am going to open a new ticket to track this new feature and capture the ideas better.

@randuhmm randuhmm mentioned this pull request Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants