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

create files for available mimetypes #5890

Closed
wants to merge 2 commits into from

Conversation

elizavetaRa
Copy link
Member

Description

Allow creation of files for mimetypes with set flag "allow_creation"

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • fix scroll to the created file

@update-docs
Copy link

update-docs bot commented Oct 8, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@elizavetaRa elizavetaRa force-pushed the create_files branch 4 times, most recently from 12f31cf to 27b33e2 Compare November 9, 2021 16:35
diocas pushed a commit to cernbox/web that referenced this pull request Nov 16, 2021
diocas pushed a commit to cernbox/web that referenced this pull request Nov 16, 2021
diocas pushed a commit to cernbox/web that referenced this pull request Nov 16, 2021
diocas added a commit to cernbox/web that referenced this pull request Nov 16, 2021
diocas added a commit to cernbox/web that referenced this pull request Nov 17, 2021
diocas added a commit to cernbox/web that referenced this pull request Nov 23, 2021
@diocas
Copy link
Contributor

diocas commented Nov 29, 2021

@kulmann @pascalwengerter I've rebased with the latest master. I've also added some fixes @elizavetaRa had to do last week. (I couldn't mark things as resolved, as I'm not the creator of this PR).
Let us know if there's anything else missing or if we can merge this. Thanks

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this locally with the ocis wopi deployment example, only got http 500: error creating resource errors when trying to create a file. 🤔 Do you have a special environment for being able to create files or is this unrelated to wopi? Opening documents works fine in the same instance... any idea?

resource = await this.$client.publicFiles.getFileInfo(
path,
this.publicLinkPassword,
DavProperties.Default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DavProperties.Default
DavProperties.PublicLink

} catch (error) {
this.showMessage({
title: this.$gettext('Creating file failed…'),
desc: error,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to leave out the error, only use the title. Make sure that it gets printed to the console. Presenting http error codes to users is not good UX. 😁

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it from the message here but the same error message is used in upstream addNewFiles()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one for addNewFiles is not good either 😁 Feel free to adapt in this PR as well, but also fine to do it in a separate one. Thanks for changing it!

@elizavetaRa
Copy link
Member Author

Tried this locally with the ocis wopi deployment example, only got http 500: error creating resource errors when trying to create a file. thinking Do you have a special environment for being able to create files or is this unrelated to wopi? Opening documents works fine in the same instance... any idea?

@ishank011 do you know anything about it?

Also @kulmann it would be nice to have the request implementation for /app/new?filename= in sdk

@ishank011
Copy link

Tried this locally with the ocis wopi deployment example, only got http 500: error creating resource errors when trying to create a file. thinking Do you have a special environment for being able to create files or is this unrelated to wopi? Opening documents works fine in the same instance... any idea?

@kulmann can you share the reva logs?

@ownclouders
Copy link
Contributor

Results for oCISFavorites https://drone.owncloud.com/owncloud/web/20542/55/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@diocas
Copy link
Contributor

diocas commented Dec 17, 2021

I've rebased. Please do not merge as the last commit is not final, I still need a reply from @wkloucek to understand how I should auth in public links.
(maybe @elizavetaRa can put this as WIP?)

@wkloucek
Copy link
Contributor

I've rebased. Please do not merge as the last commit is not final, I still need a reply from @wkloucek to understand how I should auth in public links. (maybe @elizavetaRa can put this as WIP?)

Is currently not implemented in REVA, cs3org/reva#2385 will add it.

@ownclouders
Copy link
Contributor

Results for oC10SharingAccept https://drone.owncloud.com/owncloud/web/21164/15/1
The following scenarios passed on retry:

  • webUISharingAcceptSharesToRoot/acceptShares.feature:108

@diocas
Copy link
Contributor

diocas commented Dec 20, 2021

@wkloucek let me know when this PR is available in OCIS so that I can do a final test (I've asked Hugo to merge this morning, so the REVA side is done). And should I send the token as a header or query param?

@wkloucek
Copy link
Contributor

@wkloucek let me know when this PR is available in OCIS so that I can do a final test (I've asked Hugo to merge this morning, so the REVA side is done). And should I send the token as a header or query param?

REVA was updated in oCIS and a new docker image will be available within the next hour.
In that case I would go with the public-token header.
@kulmann / @pascalwengerter Can you please confirm this?

@diocas diocas force-pushed the create_files branch 2 times, most recently from 40ebb0d to 681e0fc Compare December 21, 2021 10:30
@diocas
Copy link
Contributor

diocas commented Dec 21, 2021

PR updated. Checked and it was working in public links (although, new_url was coming back empty, had to manually change it, so please have a look there).
Doesn't work in password protected pl's (don't see the extensions in the menu), but I suppose is related to #5863

@ownclouders
Copy link
Contributor

Results for oC10SharingExternalRoot https://drone.owncloud.com/owncloud/web/21251/41/1
The following scenarios passed on retry:

  • webUISharingExternalToRoot/federationSharing.feature:378

@diocas
Copy link
Contributor

diocas commented Jan 10, 2022

PR updated with latest. @kulmann @pascalwengerter let us know if we need to change anything.

@sonarcloud
Copy link

sonarcloud bot commented Jan 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

@ownclouders
Copy link
Contributor

Results for oC10SharingPublic2 https://drone.owncloud.com/owncloud/web/21715/38/1
The following scenarios passed on retry:

  • webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:33

@ownclouders
Copy link
Contributor

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/21715/68/1
The following scenarios passed on retry:

  • webUIPrivateLinks/accessingPrivateLinks.feature:17

@kulmann kulmann mentioned this pull request Jan 25, 2022
9 tasks
@kulmann
Copy link
Member

kulmann commented Jan 25, 2022

Continued in #6312 but still not working for me. I get an http 500 on every POST to the app provider for creating files.

@diocas
Copy link
Contributor

diocas commented Jan 25, 2022

@kulmann for any app or a particular one? Latest OCIS?

@kulmann
Copy link
Member

kulmann commented Jan 25, 2022

@kulmann for any app or a particular one? Latest OCIS?

ocis_wopi deployment example, all container images up to date, happening for all apps in the create menu.

@diocas
Copy link
Contributor

diocas commented Jan 25, 2022

I confirm now I see the error as well (before it was not happening). Someone from the backend needs to check.
Just guessing: I see some error messages like "user.ocis.quota: no data available" and the creation error returned is "error calling InitiateFileUpload" so it might be related to this?
Btw, I guess we can close this PR since it was superseded (and maybe merge the other if the backend fix takes time - this is super urgent to us)

@kulmann
Copy link
Member

kulmann commented Jan 25, 2022

I confirm now I see the error as well (before it was not happening). Someone from the backend needs to check.
Just guessing: I see some error messages like "user.ocis.quota: no data available" and the creation error returned is "error calling InitiateFileUpload" so it might be related to this?
Btw, I guess we can close this PR since it was superseded (and maybe merge the other if the backend fix takes time - this is super urgent to us)

Ok, thanks for confirming. Can you open a ticket for the backend?
I'll close here, as you also suggested. Superseded by #6312
CI is green on #6312 - since the code is not mine I'll force-merge it without additional review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants