Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Is there any way I can be prompted on keeping or replacing files when they're attached to pages I'm importing?
I reuse a lot of assets between my various courses, but I also update my pages regularly. Sometimes when I update a page in Course A, I'll delete old versions of that page from Courses B and C, then send the updated page from Course A to the others. This works perfectly in terms of keeping all the internal links stable. (Since the originals in B and C were deleted, the new page from A can keep its original name, and the internal links will continue to point to the updated page.)
However, the problem comes in when I have any files attached to those pages. Let's say X.jpg is on the page. When I send it to the other courses, it becomes X-1.jpg. Both files exist in the Files portion of my course.
I can go through files and delete al the duplicates, but all that does is make it so I have dead image links and file downloads throughout. I then have to manually go back and restore images and files.
Is there some box I need to check in settings that will make it so Canvas will check to see if I have identically-named files or other assets when I'm importing pages, then prompt me as to whether I want to replace, rename, or cancel the upload of that duplicate file?
When searching through the forums, I found numerous pages telling me that uploading files directly into the files page will give me such a prompt. But that process doesn't get a look in on page importation.
Solved! Go to Solution.
I think what you are seeing cannot be change (unfortunately).
The way around it is to delete the files in the course you are importing into first and then do the import. Then when the import occurs you don't get the -1 added on.
Fortunately you can highlight multiple files and delete them at the same time (use the ctrl and click on individually - or click and then shift click to delete a block of files).
Not the ideal case, but at least you would not have to delete them 1 at a time.
Still more work than a nice question box that says a file with "name" already exists overwrite or create file name-1 (and then the do this with all other occurrences as well)
As an update, I was able to get the editing to work eventually. What I had overlooked is that the file is named twice, once in an "src" tag, and once the "data-api-endpoint" tag. I think the reason my changes were reverting was because I was only changing one of them, not both.
Once you delete all you duplicate files, do the following:
I figured this out, but now I'm copying a lot of my more frequently used files to the "user" category instead of the "class" category. Writing the line that refers to a "User file" instead of a "course file" is much more cumbersome but, I'm hoping, more stable. It might not be worth it.
I tried switching to HTML mode and changing the file name in the tags so it points to the file I want to replace it with. Canvas never saves this change. I change the file name, save, and see nothing is different. I go back into edit/HTML, and I see the file name is the unchanged original.
@jeffrey_villine wrote:
I tried switching to HTML mode and changing the file name in the tags so it points to the file I want to replace it with. Canvas never saves this change. I change the file name, save, and see nothing is different. I go back into edit/HTML, and I see the file name is the unchanged original.
Thank you for the reply, I was looking for the same solution.
As an update, I was able to get the editing to work eventually. What I had overlooked is that the file is named twice, once in an "src" tag, and once the "data-api-endpoint" tag. I think the reason my changes were reverting was because I was only changing one of them, not both.
Once you delete all you duplicate files, do the following:
I figured this out, but now I'm copying a lot of my more frequently used files to the "user" category instead of the "class" category. Writing the line that refers to a "User file" instead of a "course file" is much more cumbersome but, I'm hoping, more stable. It might not be worth it.
Wow That is quite the list of steps.
I don't know if the following will solve your problem, but I had a thought. Is it possible to put those files that you know will end up being copied in your personal files area and then have the page link to them there. I don't know if Canvas would import the files or just keep the link to your own file repository.
I just tried the above out. copying a page with links to files in your MyFiles folder keeps the file there and does not copy it over to your course.
Of course that may not be feasible with what you are doing anyway.
When it comes to importing pages that have files attached to them, it is important to import the files into the new course at the same time as the pages with the files attached. This action is what allows the files to update on the page in the new course!
Hope that helps.
The duplicating files already exist in both courses.
For instance, there's a mandatory header image I use for certain pages. The file "header.jpg" exists in Courses A, B, and C. But when I take a page that contains "header.jpg" and copy it to Course B, the system creates "header-1.jpg" rather than reuse the asset it already has.
I think what you are seeing cannot be change (unfortunately).
The way around it is to delete the files in the course you are importing into first and then do the import. Then when the import occurs you don't get the -1 added on.
Fortunately you can highlight multiple files and delete them at the same time (use the ctrl and click on individually - or click and then shift click to delete a block of files).
Not the ideal case, but at least you would not have to delete them 1 at a time.
Still more work than a nice question box that says a file with "name" already exists overwrite or create file name-1 (and then the do this with all other occurrences as well)
To participate in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.