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

Zero bytes file size on Windows #81

Open
artkoenig opened this issue Oct 4, 2016 · 2 comments
Open

Zero bytes file size on Windows #81

artkoenig opened this issue Oct 4, 2016 · 2 comments
Labels

Comments

@artkoenig
Copy link

artkoenig commented Oct 4, 2016

I use milton in my Android app via SimpletonServer. If I use Windows Explorer as client and copy large files to the server I see the progress bar progressing very fast to 99% and then waiting until the copy process is finished. It seems, that the server don't get the real file size (see screenshot).

bildschirmfoto 2016-10-04 um 15 58 37

Here is my code:

        HttpManagerBuilder b = new HttpManagerBuilder();
        b.setEnableFormAuth(false);
        b.setEnableDigestAuth(false);
        b.setEnableOptionsAuth(false);

        FileSystemResourceFactory resourceFactory = new FileSystemResourceFactory(new File(preferences.getString(BASE_FOLDER)),
                manager, getString(R.string.app_name));
        resourceFactory.setAllowDirectoryBrowsing(true);
        b.setResourceFactory(resourceFactory);
        HttpManager httpManager = b.buildHttpManager();

        if (server != null) {
            server.stop();
        }
        server = new SimpletonServer(httpManager, b.getOuterWebdavResponseHandler(), 100, 10);

        server.setHttpPort(Integer.parseInt(preferences.getString(PORT_WEBDAV)));

        server.start();

Here are the logs:

W/System.err: 43868 [Stage-dispatchStage-2] INFO io.milton.http.HttpManager - HEAD :: 192.168.1.15:8080///Pocketshare/camtasia.dmg start
W/System.err: 43879 [Stage-dispatchStage-2] INFO io.milton.http.HttpManager - HEAD :: 192.168.1.15:8080///Pocketshare/camtasia.dmg finished 10ms, Status:HTTP/1.1 200 OK, Length:null
W/System.err: 65167 [Stage-dispatchStage-1] INFO io.milton.http.HttpManager - PUT :: 192.168.1.15:8080///Pocketshare/camtasia.dmg start
W/System.err: 65174 [Stage-dispatchStage-1] WARN io.milton.http.fs.FsResource - getCurrentLock called, but no lock manager: file: /storage/emulated/0/Download/camtasia.dmg
W/System.err: 107400 [Stage-dispatchStage-1] INFO io.milton.http.HttpManager - PUT :: 192.168.1.15:8080///Pocketshare/camtasia.dmg finished 42232ms, Status:HTTP/1.1 204, Length:null
W/System.err: 107485 [Stage-dispatchStage-3] INFO io.milton.http.HttpManager - PROPPATCH :: 192.168.1.15:8080///Pocketshare/camtasia.dmg start
W/System.err: 107506 [Stage-dispatchStage-3] WARN io.milton.http.fs.FsResource - getCurrentLock called, but no lock manager: file: /storage/emulated/0/Download/camtasia.dmg
W/System.err: 107520 [Stage-dispatchStage-3] WARN io.milton.http.webdav.PropertySourcePatchSetter - property not found: {urn:schemas-microsoft-com:}Win32CreationTime on resource: class io.milton.http.fs.FsFileResource
W/System.err: 107521 [Stage-dispatchStage-3] WARN io.milton.http.webdav.PropertySourcePatchSetter - property not found: {urn:schemas-microsoft-com:}Win32LastAccessTime on resource: class io.milton.http.fs.FsFileResource
W/System.err: 107521 [Stage-dispatchStage-3] WARN io.milton.http.webdav.PropertySourcePatchSetter - property not found: {urn:schemas-microsoft-com:}Win32LastModifiedTime on resource: class io.milton.http.fs.FsFileResource
W/System.err: 107521 [Stage-dispatchStage-3] WARN io.milton.http.webdav.PropertySourcePatchSetter - property not found: {urn:schemas-microsoft-com:}Win32FileAttributes on resource: class io.milton.http.fs.FsFileResource
W/System.err: 107532 [Stage-dispatchStage-3] INFO io.milton.http.HttpManager - PROPPATCH :: 192.168.1.15:8080///Pocketshare/camtasia.dmg finished 47ms, Status:HTTP/1.1 207 Multi-status, Length:null

@bradmac
Copy link
Contributor

bradmac commented Nov 30, 2017

Hey, sorry i missed this issue. Do you still need assistance?

But note that the FileSystemResourceFactory isnt really intended for production use, its just an aid to getting started

@artkoenig
Copy link
Author

Not anymore, thank you.

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