Alexander Tkachev
46dda5fce0
CLOUD: Update NetworkReadStream
...
It now uses both CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION.
The latter is available in new libcurl (>= 7.32.0) only, thus the former
is added for older versions support.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
15c6772ff7
ALL: Fix debug, warning and error usage
...
Added prefixes, used debug(9).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f3959e1401
CLOUD: Upload ListDirectory Requests
...
Lots of checks to avoid JSON-related segfaults added.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
d57fca4665
CLOUD: JANITORIAL: Fix code formatting
2016-08-24 16:07:55 +06:00
Alexander Tkachev
cccfe7c247
CLOUD: Update BoxListDirectoryByIdRequest
...
It now uses special CurlJsonRequest static methods to check whether JSON
is an object, has a string or integer parameter.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7c9912e3d8
CLOUD: Fix IndexPageHandler warning
2016-08-24 16:07:55 +06:00
Peter Bozsó
9254df2d96
CLOUD: Fix code formatting
2016-08-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4
JANITORIAL: Remove spaces at the end of the line
...
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
01161ae7dd
CLOUD: Do some refactoring/cleanup in Networking
2016-08-24 16:07:55 +06:00
Alexander Tkachev
85f4c69fc9
CLOUD: Update StorageWizardDialog
...
It now hides code fields not just when built with SDL_Net, but also when
LocalWebserver's using default port.
So that's why NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is defined
in localwebserver.h now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
39865e6e6c
CLOUD: Add port override for LocalWebserver
...
It's enabled only when NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE is
defined.
It's not defined, because override means we have to reconfigure our
redirect links somehow to use the override port.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e833c8f65c
CLOUD: Add OSD warning when can't start LocalWebserver
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a13e03e988
CLOUD: Add Networking::Connection::isLimited()
...
`false` everywhere by default, but works on Android (`true` if not
Wi-Fi).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
36b381e411
CLOUD: Make "/create" support AJAX
...
Now creating directories doesn't refresh the "/filesAJAX" page.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
da229dd84c
CLOUD: Add "ajax" parameter for "/create" and "/upload"
...
If it's set, these redirect to "/filesAJAX" instead of "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e6caa482e1
CLOUD: Add messages in "/filesAJAX"
2016-08-24 16:07:55 +06:00
Alexander Tkachev
cd6d45ecf8
CLOUD: Minor "/filesAJAX" fix
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6442dad710
CLOUD: Add "breadcrumbs" in "/filesAJAX"
2016-08-24 16:07:55 +06:00
Alexander Tkachev
09ae2f7593
CLOUD: Add "/filesAJAX" sketch
...
It works already, but still requires some polishing.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5163fb4e02
CLOUD: Add ListAjaxHandler
...
"/list" now returns JSON with directory information. Would be used in
AJAX-based Files Manager.
2016-08-24 16:07:55 +06:00
Peter Bozsó
b616cc3d57
CLOUD: Fix indentation in openurl-osx.cpp
2016-08-24 16:07:55 +06:00
Peter Bozsó
18fc113aa9
CLOUD: Add URL opening for OS X
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6c0f491c4f
CLOUD: Add "Index of" label in server's "/files"
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ded8cdf0a0
CLOUD: Add openurl-android.cpp
2016-08-24 16:07:55 +06:00
Alexander Tkachev
06ccfd4b9a
CLOUD: Add icons in "/files" list
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1b56f59add
GUI: Update DownloadDialog
...
It now has download size and speed labels.
Commit also fixes minor mistake in ConnMan.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c431ae6d84
CLOUD: Calculate FolderDownload download speed
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d8a43cf290
CLOUD: Add openUrl() for POSIX
2016-08-24 16:07:55 +06:00
Alexander Tkachev
990dee3c4f
CLOUD: Add Networking::Browser::openUrl() sketch
...
Only Windows' shellExecute() now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dfd68306de
CLOUD: Upgrade FolderDownloadRequest::getProgress()
...
Now NetworkReadStream, which is used in DownloadRequest, which is used
in FolderDownloadRequest, returns progress information provided by
libcurl.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e25338ec24
CLOUD: Update CurlJsonRequest
...
Uses dynamically allocated buffer now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
db72fa34d6
CLOUD: Update NetworkReadStream and CurlRequest
...
Now those support POST multipart/form upload.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0a43dad629
CLOUD: Redirect to "/files" from "/"
...
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5c60cd14c2
CLOUD: Add LocalWebserver::resolveAddress()
...
Works on Linux too. And, well, I'm bad in adding backends, so it's just
#ifdefed there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
389c669a47
CLOUD: Add "directory" form for webserver "/upload"
...
The attribute is Chrome-only.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
29e6020574
CLOUD: Update "/files" hardcoded response template
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3064b44b92
CLOUD: Switch to "multiple" files uploading
...
Still doesn't support directories uploading.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
12518ed0bf
CLOUD: Fix gradient on LocalWebserver's pages
...
It was starting over every 100vh (each screen).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
35b2471290
CLOUD: Fix '\' encoding back
2016-08-24 16:07:55 +06:00
Alexander Tkachev
30430b379f
CLOUD: Fix Client's buffer
2016-08-24 16:07:55 +06:00
Alexander Tkachev
36b0069e95
CLOUD: Cleanup in Handlers
...
Simplified some stuff here and there by using HandlerUtils static
methods.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f1830645d0
CLOUD: Cleanup in LocalWebserver
2016-08-24 16:07:55 +06:00
Alexander Tkachev
34dd84f429
CLOUD: More cleanup in Client
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d1b5a64020
CLOUD: Cleanup in Reader and Client
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7fcdcc10cb
CLOUD: Cleanup in UploadFileClientHandler
...
Adds Client::noMoreContent() and Reader::noMoreContent(), which return
true when whole client's request was read.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
abae5c4371
CLOUD: Cleanup in UploadFileHandler
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e4bb7c4e75
CLOUD: Add UploadFileClientHandler
...
Now Client reads the first headers block, then LocalWebserver decides
which Handler to use. In case of "/upload", UploadFileHandler is used.
But now it only knows the "path" parameter. If that's valid, actual
UploadFileClientHandler is created, which reads the contents of the
request and, when finds there an "upload_file" field, starts saving it
in the directory specified by "path".
With that we don't need temp files approach from Reader class.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
a424ebbc28
CLOUD: Fix quotes encoding
2016-08-24 16:07:55 +06:00
Alexander Tkachev
eaa5fb1759
CLOUD: Put "/upload" "path" parameter in the URL
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f0fc18d2ee
CLOUD: Add UploadFileHandler
2016-08-24 16:07:55 +06:00