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

images not opening in NC21 #543

Closed
beardhatcode opened this issue Feb 26, 2021 · 14 comments
Closed

images not opening in NC21 #543

beardhatcode opened this issue Feb 26, 2021 · 14 comments

Comments

@beardhatcode
Copy link

I just updated to NC21, but now I can no longer view images from maps, instead I see a spinner (the same files do view from Files and in the Photos app)

When looking at the console, I see that the preview is successfully fetched, but it is not shown.

screenshot_2021-02-26-091745
console-export-2021-2-26_9-15-49.txt

NC21.0.0, Maps 0.1.8

@tiigaaa
Copy link

tiigaaa commented Mar 3, 2021

HI,
I have exactly the same issue, did you find a solution?
I can see the picture in the preview window but not in the middle of the screen.
MAPS

@tacruc
Copy link
Collaborator

tacruc commented Mar 3, 2021

@eneiluj @skjnldsv @juliushaertl
is this an error of the viewer or do we provide the wrong file object?
The error is produced in:

canDelete() {
	return this.currentFile?.permissions?.includes('D')
},

For some reason permissions is an integer valued 27 in my case.
The currentFile Object exampe:

basename: "2629971823265445308_account_id=3.jpg"
dateTaken: ***8887735
etag: "***60521b5f8899967cefbf380a809de"
failed: false
fileId: ***4023
fileid: ***4023
filename: ***
hasPreview: true
lastmod: ***41743**
lat: 48.***
lng: 7.***
loaded: false
mime: "image/jpeg"
modal: {…}
path: ***
permissions: 27
size: ***547
type: "file"

@juliusknorr
Copy link
Member

Seems like an issue with a manually provided file info here. For the files app permissions are handed over from the webdav response in a string based represenation.

@skjnldsv I guess it would make sense to not only check for the dav permission flags but also try to check against the bitwise permissions when a numeric value is provided.

@RobinFrcd
Copy link
Contributor

Same issue here, I also get a permissions: 27. When I check in DB (oc_filecache) the permissions field is also 27.
So the conversion from 27 to RGDNVW is omitted somewhere.

@Olliek95
Copy link

Olliek95 commented Mar 8, 2021

Same here. Any update on this issue? Is there anything we can do to help diagnose this problem?

@tiigaaa

This comment has been minimized.

@skjnldsv
Copy link
Member

@skjnldsv I guess it would make sense to not only check for the dav permission flags but also try to check against the bitwise permissions when a numeric value is provided.

Yeah, I'm fine with that, but this is frustrating to have to manage both cases 🤔
Can dav return the bitwise?

@juliusknorr
Copy link
Member

Can dav return the bitwise?

I'm not sure about that, while the permissions dav property is in the http://owncloud.org/ns namespace so nothing that seems to be inside of the webdav standard itself, it would be a breaking change for clients all over the place.

As a workaround the maps app could of course just map those permissions from the bit flags to the dav format based on how the backend does it in https://github.com/nextcloud/server/blob/19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc/apps/dav/lib/Connector/Sabre/Node.php#L300-L327

@tacruc
Copy link
Collaborator

tacruc commented Mar 11, 2021

Whats inconvenient is that \OCP\Files\Node implemented by OC\Files\Node
https://github.com/nextcloud/server/blob/19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc/lib/private/Files/Node/Node.php#L215 does not provide getDavPermissions.
So I will solve the problem, by not providing permissions in

$file_object->permissions = $file->getPermissions();

Anyhow I think the root issue should be fixed in server or viewer.

@tacruc
Copy link
Collaborator

tacruc commented Mar 11, 2021

Anybody out there willing to test #559?

@tacruc tacruc closed this as completed in 2bd43bc Mar 12, 2021
tacruc added a commit that referenced this issue Mar 12, 2021
@tiigaaa
Copy link

tiigaaa commented Mar 12, 2021

Hello,

many thankks @tacruc I can confim its working again.
Just "git pull" and jippi working :)
image

@RobinFrcd
Copy link
Contributor

Thank you very much for this fix!

Any chance to have a release with it soon ? Thanks!

@beardhatcode
Copy link
Author

Works for me. Thank you @tacruc.

@kedare
Copy link

kedare commented Jun 23, 2021

Up, any idea of when this will be released ?
Thanks

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

No branches or pull requests

8 participants