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

services: implement file fetching from external storage #416

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

ppanero
Copy link
Member

@ppanero ppanero commented Oct 11, 2022

Now there will be two "workflows" to upload files:
a) if the payload does not contain a uri/sotrage_class==E it goes as before: init will create the file record (no object version nor file instance), Then requests to /content and /commit are needed from the user to get the file in.

b) if the payload does contain a uri/sotrage_class==E, the init creates an object version and a file instance, and triggers the task to do a set_content and commit. Those actions are forbiden by the user.

Copy link
Member Author

@ppanero ppanero left a comment

Choose a reason for hiding this comment

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

.

@ppanero ppanero force-pushed the files-fetching branch 6 times, most recently from 1b866ad to 0663e22 Compare October 20, 2022 14:28
@ppanero ppanero force-pushed the files-fetching branch 2 times, most recently from 6a37681 to 207cdd6 Compare October 20, 2022 15:23
Copy link
Member

@slint slint left a comment

Choose a reason for hiding this comment

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

LGTM! I think we're almost there, just a couple of naming and placement things to avoid data/code migrations in the future.

invenio_records_resources/config.py Outdated Show resolved Hide resolved
invenio_records_resources/services/files/service.py Outdated Show resolved Hide resolved
invenio_records_resources/services/files/transfer.py Outdated Show resolved Hide resolved
tests/mock_module/permissions.py Outdated Show resolved Hide resolved
@ppanero
Copy link
Member Author

ppanero commented Nov 1, 2022

Copy link
Member

@slint slint left a comment

Choose a reason for hiding this comment

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

We have to redo everything...

:trollface:

One missing entrypoint and we're good to go 🚀

"inveniordm.test",
]

app_config["FILES_REST_STORAGE_CLASS_LIST"] = {
Copy link
Member

Choose a reason for hiding this comment

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

shelve/comment: we have to remember to configure this in app-rdm (and ZenodoRDM)

@ppanero
Copy link
Member Author

ppanero commented Nov 2, 2022

@slint

@kpsherva kpsherva merged commit fd65e83 into inveniosoftware:master Nov 3, 2022
@ppanero ppanero deleted the files-fetching branch November 4, 2022 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants