-
Notifications
You must be signed in to change notification settings - Fork 23
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
Storage adapters should have #id_for #887
Comments
would this just be def id_for(file:, original_filename:, resource: nil, **_extra_arguments)
new_path = path_generator.generate(resource: resource, file: file, original_filename: original_filename)
# FileUtils.mkdir_p(new_path.parent)
# file_mover.call(file.path, new_path)
# find_by(id: Valkyrie::ID.new("disk://#{new_path}"))
Valkyrie::ID.new("disk://#{new_path}")
end |
Yeah that makes sense to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should take the same parameters as #upload, but just return the ID that it would build when it's done.
Useful when you're not storing the resulting ID, and need to re-calculate it so you can find the file again.
The text was updated successfully, but these errors were encountered: