The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
It seems that when students submit an assignment and then resubmit an assignment with the same filename, Canvas automatically appends a number to the end of the filename. For example, if the student submits:
solution.pdf
and then decides to resubmit the assignment using the same filename, Canvas will rename it as:
solution-1.pdf
But what if the student and the instructor do not want the file renamed upon resubmission? I am thinking in particular about students in my Java programming class, because incorrect filenames will prevent a student's submission from working correctly.
Is one of the following possible using Canvas?
One workaround is to ask the students to zip their submissions, because then only the zipped file would get renamed. But this adds a layer of complexity I would like the students to avoid.
Thank you for any advice you might have.
Solved! Go to Solution.
krumpe, @Chris_Hofer
For the reasons described above, I can't see a logistical reason why Canvas needs to do the renaming (and it doesn't for Google Doc submissions), so it must have been a design one to illustrate that the files were actually different submissions. Every file is assigned an unique id. They want to hang on to all uploads so instructors can go back and look at previous submissions. They have a "never discard a student submission" kind of philosophy.
When you download submissions, you get unique names no matter what the filename itself is because the add the unique file id to the name. Someone else was complaining about that because they needed the short name originally used by the uploader, not the extra stuff that Canvas appends.
Hold the presses!
@kona just came in for another reason and explained everything, even saying there's a discussion going on about it right now. I have verified this works.
Ignore everything I wrote above.
The file uploads are saved into the student's files in a folder called "unfiled". Even though the concept of a folder is an artificial construct, you can't have two files with the same name, so they get automatically renamed.
What a student can do to fix Norm's problem is this:
In the SpeedGrader, the instructor may see a preview for the original file but if you try to download it, you will get a "Page Not Found: This file has been deleted" error. If you go to the latest version, though, it will download with the name the student has renamed the file to be.
If you want to be able to see the original file, you may want your students to rename them rather than deleting them.
Hopefully that makes up for my earlier misunderstanding ![]()
krumpe,
Are you sure that this is Canvas doing the renaming and not your browser?
I hadn't experienced the behavior your describing, so I went to my summer course and found a student who submitted the same assignment three times with the same name. In Canvas, when I went to download it (at least in the SpeedGrader), it offered me the same name every time.
However, when you ask your browser to save a file and that file already exists, it will automatically append a number to the end to make sure it is unique. Canvas doesn't need to do that because each file upload has a unique id attached to it, so you can have hundreds of files named the same thing and it doesn't care. But in your operating system, each file has to have an unique name, so the browsers rename them to keep from clobbering the old one.
In your browser, you should have the ability to choose the filename to save the document as, unless you've told it to automatically save them. If you do, you can choose the name to save it as and overwrite the original. However, it could be bad to automatically overwrite existing files -- for instance, if two students use the same filename on an upload?
Hi @James ...
I believe I'm experiencing the same things as krumpe. In my sandbox course, I went to my "Student View" and submitted a MS Word document file attachment to an Assignment. Then, I immediately re-submitted the Assignment again with the same file attachment, and Canvas had appended a "-1" to the end of the file name. (I did not have two separate files to attach for each submission.) I then deleted the file from my folder on my computer. Then, when I exited out of "Student View", I went to the SpeedGrader, and I downloaded both "versions" of the file...each with their own file name. I was using Google Chrome 44 when testing this out...if that helps.
@Chris_Hofer , krumpe
My apologies.
I misunderstood what Norm was saying. I am seeing the same behavior you are in Chrome 44 and Firefox 40.
The file that my student had uploaded during the summer was done through Google Docs and that may have been why it allowed the same name multiple times. I didn't have anyone upload an actual attachment multiple times to see if it was working then and became broken since or if this has always been the behavior.
Thank you for the reply James, but...
I would expect my browser to do some file renaming if I am downloading a file to my computer. But in this case, I am uploading a file as an assignment submission. For my testing, I:
The filename is not changing until after I upload it. I am using Chrome, but I suspect this is not browser related, as I am simply browsing to the exact same file on my desktop, and the correct filename shows up everywhere until after the upload has completed.
krumpe, @Chris_Hofer
For the reasons described above, I can't see a logistical reason why Canvas needs to do the renaming (and it doesn't for Google Doc submissions), so it must have been a design one to illustrate that the files were actually different submissions. Every file is assigned an unique id. They want to hang on to all uploads so instructors can go back and look at previous submissions. They have a "never discard a student submission" kind of philosophy.
When you download submissions, you get unique names no matter what the filename itself is because the add the unique file id to the name. Someone else was complaining about that because they needed the short name originally used by the uploader, not the extra stuff that Canvas appends.
Hold the presses!
@kona just came in for another reason and explained everything, even saying there's a discussion going on about it right now. I have verified this works.
Ignore everything I wrote above.
The file uploads are saved into the student's files in a folder called "unfiled". Even though the concept of a folder is an artificial construct, you can't have two files with the same name, so they get automatically renamed.
What a student can do to fix Norm's problem is this:
In the SpeedGrader, the instructor may see a preview for the original file but if you try to download it, you will get a "Page Not Found: This file has been deleted" error. If you go to the latest version, though, it will download with the name the student has renamed the file to be.
If you want to be able to see the original file, you may want your students to rename them rather than deleting them.
Hopefully that makes up for my earlier misunderstanding ![]()
As James and Kona articulated, renaming submitted files with an appended number is a common practice when uploading (or downloading) a file with the same name. While I understand this will cause a workaround for you, the benefits to others is immeasurable.
One example comes from a creative writing course. A student submits their first draft of an assignment. The instructor provides feedback and asks the student to resubmit. Most students will work from their original file and resubmit. Appending a number allows each document to be separate artifacts - showing progression and growth!
There is no question that those numbers are valuable in the filenames. And programming, like creative writing, is an iterative process. Programs are seldom perfect, but each iteration is an improvement. That is one of the reasons why there are tools out there for "version control", so that programmers can move gracefully among their various versions.
To be clear, this is a workaround for not just me, but for anyone who teaches a Java programming course. I don't want my initial question to seem like a "pet feature" that benefits just one person. This semester, our department has 300 students taking the Java programming course. Each student will submit roughly 20 assignments...so roughly 6,000 files, all of which need to be renamed because those files will not work with incorrect filenames. This is not just a problem for the all the faculty doing the grading, but for the students who want to download a previous version of the file. All filenames will be wrong and all will need to be changed.
I would not suggest that Canvas change the ability to append numbers or other useful information to filenames, but an option to turn that behavior off on a per-assignment basis would have immeasurable benefits to the students and faculty who teach programming courses.
krumpe,
This sounds like it has moved into the realm of a feature request rather than a question needing an answer. Perhaps you could create it as a feature request so that people can vote on it and share use-cases to demonstrate the need to Canvas. See How do I create a new feature idea? for more information.
Here are some thoughts about your comments here:
You mentioned version control. Do you have your students use that? If so, then students shouldn't need to retrieve a previous version from Canvas, they could just go the revision control system. If not, then it's important that Canvas keep separate names to provide that revision control.
In your explanation of submitting an assignment, you should tell them that part of the resubmission process is to go into their settings, chooose files, go to "unfiled", and rename the primary file with a -1, -2, or -3, whichever is the first one available. Then they can proceed to resubmit the file. Tell them that you will not accept a resubmission from them unless they do this. It's less than 30 seconds for them to do that, but 30 seconds per student per resubmission is nothing. For an instructor having to do that for every student resubmission, it becomes noticeable.
By renaming the file first, the proper name becomes available and so students could then re-submit without having to then go in and change the name before you can see it. That also allows for a numbering scheme that keeps the revision order (-1 is older than -2) as opposed to log file rotation order (where .1 is newer than .2 and you have to rename every file every time a new one is created).
Since you're teaching a programming class, perhaps one exercise could be to write a program that submits an assignment through the API. It first checks the files to see if the properly named file exists in the student's files, if it does, it renames it. Then it submits the file / assignment.
As a side note, It would also be a good idea to practice folder organization so that all of their files don't remain in "unfiled". If you're teaching good, structured, programming, you should also teach that for the files themselves.
Another idea is to use version control. They each have their own folder in a repository and when they go to submit an assignment, they just send you a link to that revision. Don't let them upload a file directly into Canvas, but make it a text-box submission. With some revision control systems, there is a web interface where you could go in and look a their code directly from the web, see differences and changes made from previous versions to see if they fixed what they needed to or not. You could, if you need to run it, download the version directly from there rather than having to go into Canvas, download the .java file, save it to disk, and then opening it up to execute it.
I noticed this issue yesterday while looking into Canvas APIs. I am thrown off by it too.
> Since you're teaching a programming class, perhaps one exercise could be to write a program that submits an assignment through the API. It first checks the files to see if the properly named file exists in the student's files, if it does, it renames it. Then it submits the file / assignment.
I apologize on dredging up an old question but I was looking into the file rename issue as a teacher fresh to canvas and this solution tilted me a touch. If an API exists that could allow someone to rename already submitted files, what is stopping Canvas from doing this on the backend automatically? Rather than renaming the newly submitted files, rename the previous ones?
To put this back onto the teacher above is hardly a positive option for a solution as it would also mean that only this one class would benefit from it.
I am puzzled as to why renaming solution.java to solution-1.java is the default. It makes no sense to me. The LMS at my previous college would save old submissions and rename those with sequence numbers, but the latest submission would always be solution.java (assuming that was the original name). This greatly simplified scripting of answer checking.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, 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.