Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

n-1 image files displayed after upload #1052

Open
michaelstingl opened this issue Apr 19, 2018 · 0 comments
Open

n-1 image files displayed after upload #1052

michaelstingl opened this issue Apr 19, 2018 · 0 comments

Comments

@michaelstingl
Copy link
Contributor

After upload, one image file is missing in the files list.

Steps to reproduce

  1. Navigate to empty folder
  2. Use "Upload Photo/Video"
  3. Select up to 3 images, then press "Done"

Upload image 1:

   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
            <- 404 application/xml 274b 938ms
>> PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
       <- 201 text/html [no content] 842ms

==> no image displayed

  • Why is there no PROPFIND request after upload of 1 image?

Upload image 1 + image 2:

   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
            <- 404 application/xml 274b 830ms
   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-10_0149.PNG
            <- 404 application/xml 274b 443ms
   PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
       <- 201 text/html [no content] 794ms
   PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-10_0149.PNG
       <- 201 text/html [no content] 919ms
   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/
            <- 207 application/xml 1.46k 458ms
   GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-18-
       58_0148?
       <- 200 image/png 676b 1.04s
>> GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-18-
       58_0148?
       <- 200 image/png 676b 256ms

==> image 1 displayed

  • Why does PROPFIND responds (sometimes) with only 1 available image? (see XML response) Server issue? PROPFIND request too early?
  • Why are there 2x GET requests for the same thumbnail?
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/webdav/Upload-Test/</d:href>
    <d:propstat>
      <d:prop>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:getlastmodified>Thu, 19 Apr 2018 16:06:15 GMT</d:getlastmodified>
        <oc:size>1152</oc:size>
        <oc:id>00038651oc29gy11vrx9</oc:id>
        <d:quota-available-bytes>1966770483</d:quota-available-bytes>
        <d:getetag>&quot;5ad8be7743cf1&quot;</d:getetag>
        <oc:permissions>RDNVCK</oc:permissions>
        <d:quota-used-bytes>1152</d:quota-used-bytes>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:creationdate/>
        <d:getcontentlength/>
        <d:displayname/>
        <d:getcontenttype/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG</d:href>
    <d:propstat>
      <d:prop>
        <d:resourcetype/>
        <d:getlastmodified>Thu, 19 Apr 2018 16:06:15 GMT</d:getlastmodified>
        <oc:size>1152</oc:size>
        <oc:id>00039035oc29gy11vrx9</oc:id>
        <d:getcontentlength>1152</d:getcontentlength>
        <d:getetag>&quot;7fe031d277df84ebe5daabef364664c9&quot;</d:getetag>
        <oc:permissions>RDNVW</oc:permissions>
        <d:getcontenttype>image/png</d:getcontenttype>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:creationdate/>
        <d:displayname/>
        <d:quota-available-bytes/>
        <d:quota-used-bytes/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Upload image 1 + image 2 + image 3:

   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
            <- 404 application/xml 274b 734ms
   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-10_0149.PNG
            <- 404 application/xml 274b 355ms
   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-23_0150.PNG
            <- 404 application/xml 274b 553ms
   PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-18-58_0148.PNG
       <- 201 text/html [no content] 1.05s
   PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-10_0149.PNG
       <- 201 text/html [no content] 843ms
   PUT https://owncloud.example.com/remote.php/webdav/Upload-Test/Photo-2018-04-19-17-19-23_0150.PNG
       <- 201 text/html [no content] 902ms
   PROPFIND https://owncloud.example.com/remote.php/webdav/Upload-Test/
            <- 207 application/xml 2.14k 446ms
   GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-18-
       58_0148?
       <- 200 image/png 676b 828ms
   GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-19-
       10_0149?
       <- 200 image/png 731b 832ms
   GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-18-
       58_0148?
       <- 200 image/png 676b 729ms
>> GET https://owncloud.example.com/index.php/apps/files/api/v1/thumbnail/64/64/Upload-Test/Photo-2018-04-19-17-19-
       10_0149?
       <- 200 image/png 731b 365ms

==> image 1 + image 2 displayed

  • Why does PROPFIND responds (sometimes) with only 2 available image? Server issue? PROPFIND request too early?
  • Why are there 2x GET requests for every thumbnail?

Expected behaviour

After image upload, every uploaded image should be listed in the files list.

Actual behaviour

n-1 image files are displayed after upload.

Server configuration

Web server:
Apache/2.4.18

Database:
5.7.21

PHP version:
PHP 7.0.28

ownCloud version:
10.0.8 RC3

Storage backend (external storage):
local storage

Client

iOS version:
11.4 (beta)

ownCloud app version:
3.7.3

Device model:
iPad Pro 10.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant