58 Commits

Author SHA1 Message Date
Miguel Jacq
f6f5ff0b7e Fix conflicts 2019-03-25 13:43:08 +11:00
Micah Lee
06731ce56a Merge pull request #935 from mig5/fix_receive_mode_folder_collision
On a folder name collision, make sure we update the self.receive_mode_dir attribute
2019-03-22 17:50:33 -07:00
Miguel Jacq
2666bb2dae Use png rather than svg for warning image. Concatenate flash messages with commas to reduce page height. Allow warning message to be wider 2019-03-11 17:27:17 +11:00
Miguel Jacq
188281e8d2 On a folder name collision, make sure we update the self.receive_mode_dir attribute after creating a unique folder with a suffix. Adjust Receive Mode tests to test for this 2019-03-08 12:54:10 +11:00
Miguel Jacq
26d262ccfc Add a Startup Timer feature (scheduled start / dead man's switch) 2019-03-05 10:28:27 +11:00
Miguel Jacq
7690a63935 Always reset the slug to an empty string when the web server stops 2019-02-19 08:37:32 +11:00
Micah Lee
2220281e80 Fix minor bugs: When making the ajax POST request, strip the trailing slash from window.location.pathname so the URL works in public mode; and add a newline before printing message when receiving file 2019-02-18 10:57:20 -08:00
Micah Lee
430396a433 Merge branch 'develop' into 899_send_files_ajax 2019-02-17 10:08:01 -08:00
Miguel Jacq
5ba7d544bc Update the GUI when the browser has canceled an upload in Receive Mode. Don't increment the completed counter 2019-02-17 15:49:37 +11:00
Micah Lee
032d545030 Make uploading over ajax, and ajax flash messages, work 2019-02-15 14:52:00 -08:00
Micah Lee
18fe0b1760 Refactor upload_logic to work with both normal uploads and ajax uploads 2019-02-14 10:11:04 -08:00
Micah Lee
109276661b Update the noscript upload instructions on the receive mode upload page, and add separate page for instructions to disable NoScript XSS setting 2019-02-14 09:31:39 -08:00
Micah Lee
38238fec40 Oops, was passing self.upload_error into the wrong close function 2019-02-12 16:02:19 -08:00
Micah Lee
9f611331c6 Catch more exceptions in ReceiveModeFile that trigger on a full disk 2019-02-12 15:54:25 -08:00
Micah Lee
2ee61f04ee Gracefully handle exceptions while writing a file during a receive mode transfer (like out of disk space error) 2019-02-12 14:36:14 -08:00
Micah Lee
eebeba977f Fix typo in comment 2019-02-12 14:30:41 -08:00
Micah Lee
670b967020 When you hit an upload_error, alert the user 2019-02-11 23:23:31 -08:00
Micah Lee
e9ac9fe1b6 Call secure_filename on the filename first thing, so we don't end up working with multiple versions of the same filename 2019-02-11 23:05:51 -08:00
Micah Lee
b82d10ad92 Refactor receive mode to start saving files to data_dir with .part extension while they're downloading 2019-02-11 22:46:39 -08:00
Micah Lee
17ff39b944 Tests are failing because a receive mode dir already exists, so this makes them pass 2019-01-21 17:43:13 -08:00
Micah Lee
dcca933d13 Oops, finish resolving merge conflict 2019-01-21 17:32:58 -08:00
Micah Lee
03e38b1fae Merge branch 'develop' into 866_receive_mode_crash 2019-01-21 17:28:24 -08:00
Micah Lee
d68db75c68 Write test to confirm that submitting the receive mode form without selecting files doesn't change in_progress_count or completed_count 2019-01-21 17:11:58 -08:00
Micah Lee
a658b65140 Don't update the GUI at all untless it has been told about the request 2019-01-21 11:16:55 -08:00
Micah Lee
efe45288c9 Prevent ReceiveModeRequest.file_write_func from sending a message to the GUI if the request should be closed 2019-01-21 10:56:31 -08:00
Micah Lee
8dddc03e59 In receive mode, only tell the GUI that a new request is coming in if it contains files 2019-01-20 16:20:36 -08:00
Micah Lee
2017509283 Oops, I missed this when resolving merge conflicts 2019-01-20 16:00:18 -08:00
Micah Lee
9d6f9dd61a Merge branch 'develop' into 866_receive_mode_crash 2019-01-20 15:42:09 -08:00
Micah Lee
053d0ed615 - Refactor the Web.ShareMode client_cancel variable to be Web.stop_q, a thread-safe queue that communicates to both share and receive mode when the user stops the server. In share mode this still stops sending the file. In receive mode, if there's a transfer in progress, it cancels it in the middle, and doesn't end up saving that file
- In receive mode, make the receive mode dir right before saving a file (so if it doesn't complete, don't make an empty dir)
- Minor UX tweak: resizing the window stretches the History widget first
2019-01-20 15:25:36 -08:00
Micah Lee
303a2f9f34 Rename receive mode "downloads_dir" to the OnionShare "data_dir" 2019-01-20 11:46:20 -08:00
Micah Lee
cc857a39bb Finish removing web event REQUEST_CLOSE_SERVER, which used to be a receive mode feature to allow the Tor Browser user to close the server, but we removed 2019-01-19 20:43:25 -08:00
Micah Lee
e99666f458 When enabling debug mode in Web, use common.build_data_dir() to get data dir path 2018-12-16 17:20:28 -08:00
Micah Lee
f85c68c504 Change filename of flask debug log file, store it in the OnionShare data dir instead of /tmp 2018-12-11 08:06:14 -08:00
Miguel Jacq
7151874dad remove debug log 2018-11-13 15:06:28 +11:00
Miguel Jacq
1b670898a0 Merge develop branch and fix conflicts 2018-11-13 14:45:40 +11:00
Miguel Jacq
005d2d0af7 Try and fix closing the request for a valid upload post-timer expiry, whilst still rejecting subsequent uploads 2018-11-13 14:42:26 +11:00
Micah Lee
a8dae82ac3 Fix tests so they recognize the new receive mode location 2018-10-26 15:08:55 -07:00
Micah Lee
0bab7be444 Communicate the receive mode dir to the GUI, so clicking the open folder button opens the file manager to the correct directory 2018-10-25 21:38:20 -07:00
Micah Lee
2c45f6851e Receive mode puts files in a directory based on the timestamp of the upload 2018-10-25 21:13:16 -07:00
Miguel Jacq
b27007b20d Make auto-stop timer work on CLI when an upload is still in progress on expiry 2018-10-02 15:41:29 +10:00
Miguel Jacq
509d313464 Try to fix logic handling last upload after timer expiry 2018-10-02 08:22:08 +10:00
Miguel Jacq
80a70a6fc6 remove unused variable 2018-10-02 07:33:13 +10:00
Miguel Jacq
7fc4f97b2a remove uploads_in_progress list from web side 2018-10-01 19:18:50 +10:00
Miguel Jacq
c8fc6d7f85 Another unused variable 2018-10-01 19:17:50 +10:00
Miguel Jacq
eeedd32793 remove unused variable, whitespace 2018-10-01 19:15:58 +10:00
Miguel Jacq
d267cc597d Fix logic for handling an upload still in progress when timer runs out. Show thankyou page for last uploader post-timer expiry 2018-10-01 18:42:53 +10:00
Miguel Jacq
d69bba4c9d Merge develop in and fix upload/timer functionality so that it works as described. Still needs fixing to not throw a connection error to the lucky last uploader after their upload completes and server stops due to expiry having passed 2018-10-01 16:42:54 +10:00
Miguel Jacq
b465d9db85 Analyse the right file size to determine if the download has finished in the UI (in order to decide whether to stop server yet) 2018-09-25 14:40:10 +10:00
Micah Lee
a8779d9c4f Access .upload_count from the correct object after the web refactor 2018-09-21 17:42:36 -07:00
Micah Lee
b96b36122d Actually tell the GUI the progess 2018-09-21 17:08:11 -07:00