Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
When a file or image is embedded in a page, the html contains the file ID number so the page renders correctly. Since I am skilled enough with html, it would be simple for me to replace one image with another image if I just knew the ID number of the image. But when I look in the Files section, no IDs are to be found (or at least I cannot find them). Is there any way to reveal them?
The main reason for this is that a few of my pages use divs to create a responsive structure. If I could just replace an image in RCE without breaking that structure, then I wouldn't need the code. But there seems to be no way of doing this from the menu.
My workaround has been to create a blank line in html, then embed the new image in RCE, then go back to html and copy the relevant code (and change the alt text, etc). But that is a lot of extra work just to get the file ID number.
Any help?
#embed #image #html
Solved! Go to Solution.
Good evening, @davidh1 ...
When you are in your course "Files" and hover your mouse cursor over a file name, look at the bottom of your browser window. You should see a URL for that specific file. For example, it might look something like this:
https://SchoolName.instructure.com/files/1234567/download?download_frd=1
I believe that "1234567" (or whatever number it is for you) is the File ID number you are looking for.
I hope this will help in some way, David. Sing out if you have any other questions about this...thanks! Take care, stay safe, and be well.
Good evening, @davidh1 ...
When you are in your course "Files" and hover your mouse cursor over a file name, look at the bottom of your browser window. You should see a URL for that specific file. For example, it might look something like this:
https://SchoolName.instructure.com/files/1234567/download?download_frd=1
I believe that "1234567" (or whatever number it is for you) is the File ID number you are looking for.
I hope this will help in some way, David. Sing out if you have any other questions about this...thanks! Take care, stay safe, and be well.
Thank you! This does work, though it would be nicer if Canvas just listed the file ID. But I can make do with this!
Hi, @Chris_Hofer -
I think I have the opposite problem as David above - I want to CHANGE the name of the image file so my existing pages will use that image. I have this Canvas panda at the bottom of all of my assignments, but every time I import from another course, that image gets duplicated and named -1, -2, -3, etc. I got over-zealous in file cleanup, and deleted all but one, and now the image is gone on many of my pages. I'd like to change the file ID to match the code:
<p><a href="https://community.canvaslms.com/t5/Student-Guide/tkb-p/student" target="_blank" rel="noopener"><span><img src="https://gcc.instructure.com/courses/48398/files/6827753/download?wrap=1" alt="canvas panda" width="174" height="84" data-api-endpoint="https://gcc.instructure.com/api/v1/courses/48398/files/6827753" data-api-returntype="File" data-id="2125730" /></span></a></p>
Thanks in advance for any thoughts or ideas!
Hi @kmcgrath,
As far as I know, you can't really change the id number of a file, that's basically auto-created by Canvas when the file is uploaded.
I think what you'd need to do is restore the file with the id of 6827753. There is an unofficial, undocumented, and unsupported way to do this, but because it's unsupported we generally don't discuss that method here in the community. You may be able to contact Canvas support to see if they could restore he file with that id number for you though.
If you have no luck with that, I think you'd unfortunately have to modify every page to point to the new existing file.
I believe the issue probably stems from doing multiple imports. Without adding a ton of additional logic in, which probably isn't feasible, I think the import just makes a copy of whatever files are coming over, rather than checking to see if they exist and if they are the same exact thing as something already in the course. Like you, I hate a messy files area, so I have run into this before myself and also wish there was an easier way to fix this.
I know this isn't necessarily the answer you were looking for, but I hope it helps a bit.
-Chris
It's definitely coming from multiple imports - I pull from different past courses because I have 6-, 13-, and 16- week versions. So I end up with duplicates - if they can't have it check on importing, maybe a dupe check/merge after import is possible?
I hadn't thought of asking support to restore it - I will try that. Thank you!
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.