Added functionality for changing file names and their URI#35
Open
SHU8HAM1 wants to merge 1 commit into
Open
Conversation
6 tasks
Author
|
The pull request to the workbench that uses this module: mjordan/islandora_workbench#931 |
mjordan
reviewed
Apr 24, 2025
|
|
||
| if (!file_exists($source_file_uri)) { | ||
| // Show an error if no file on disc. | ||
| return 'No file exists in this'; |
Owner
There was a problem hiding this comment.
It would be useful to have this error message say "No file with name XX exists in the XXX filesystem."
mjordan
reviewed
Apr 24, 2025
| $file->setFileUri($filepath_new); | ||
| $status = $file->save(); | ||
|
|
||
| return new JsonResponse(['message' => 'File renamed successfully', 'new_filename' => $filename_new]); |
Owner
There was a problem hiding this comment.
This message should contain both the original and new filename. Also, can we add this entry to the Drupal logger?
Owner
|
To be consistent with a large PR I merged last week, can you please:
Thanks! |
Author
|
Hi @mjordan , thanks for the feedback, I'll address all the concerns and get back to you when I make the changes |
This was referenced Sep 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added helper functions to change file name and URI from Islandora Workbench