Author Topic: Automatically re-upload whatever wasn't uploaded even if power to PC is cut  (Read 5270 times)

Offline ericore

  • Member
  • *
  • Posts: 10
First and foremost, nice piece of software; you have me sold.

My computer shut off during the middle of the night, anyways I was uploading hundreds of files (nothing exceeding 10 GB in sum though), I restarted the app then I got worried that nothing of session was saved but alas there was an upload history.  The issue was I wanted to re-uploaded whatever wasn't uploaded last time.  This is an easy task if you are just uploading a few files, but if you are uploading hundreds than have fun fishing :)  I ended up getting a directory listing of my upload folder, then extracting the filenames from the upload history then using winmerge to see what wasn't uploaded.  Couldn't find the feature that would re-upload files that were put in queue but which did not upload.   

Does such a feature exist?  If not, could you implement it?

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 249
  • just ask me ;)
    • File & Image Uploader
well, it depends ...

my program regulary saves settings,
but if your computer shutdown incorrectly, it can't save which files were already uploaded and what was not

I can't influence this

Offline ericore

  • Member
  • *
  • Posts: 10
I'm not too sure about the can't part, but I respect your decision.
Fundamentally, if your program regularly saves settings that means that the queue (what was chosen to upload) was saved.
All you need to do is to compare that saved queue to the saved upload history (the file names of course, not links).  That can be done even if the PC shutdown unexpectedly.  But again, I respect your decision.

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 249
  • just ask me ;)
    • File & Image Uploader
well, it isn't that bad idea but not possible,
it would need some advanced log with what was already uploaded

queue is saved regulary but it can't be saved every second as it would cause huge computer load,
so you may always loose some stuff if you shutdown incorrectly :(

Offline ericore

  • Member
  • *
  • Posts: 10
Way back in the day, I used to make C++ programs.
Either you are over-analysing it, or I am under-analyzing it.
Precision or constant logging is not important to implement this feature.
Regardless of when the PC powers off, what I requested to be uploaded does not change.
Regardless of when the PC powers off, your program does a perfect job of logging exactly what was uploaded successfully.
Flawless :)
There is no need for a new log.
You just store the file names of what the user requested to upload, and append only if the user adds new files.
So this action gets invoked only when the add files function is invoked.
Since your program does a perfect job of logging successful uploads, you need to store the file names(only when the program is started) of whatever was uploaded successfully.  You program already has a function for this. 
Finally, the new component, where you compare the two containers [Add files (filenames thereof), Uploaded Successfully (filenames thereof)], where the difference is stored, the result are the files which are not uploaded successfully, now add these to the queue with a nice message saying "The following files during previous upload failed to upload."

I make it sound so easy don't I :)
« Last Edit: 18-09-2012, 20:03:09 by ericore »

Offline z_o_o_m

  • Administrator
  • Hero Member
  • *****
  • Posts: 7 249
  • just ask me ;)
    • File & Image Uploader
no, it is not that easey ...

this does not solve a problem "if the same file is in the queue more times",
yes, that can happen too ... and you can't say that all were uploaded correctly if there is only 1 correct link in the log ;)

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Human verification ... What is the name of my program? File & Image ********?: