From: Colin T. <col...@ou...> - 2006-03-15 12:37:17
|
Peter Crowther wrote: > This is probably one for Matthew. Matthew's on leave. He might want to elaborate with some pictures... > In summary: Is there one uploaded_files root (ie with a null parent) per > resource, or is there one total? Did something change with the > uploaded_files rewrite? There's some history with this, I encountered a problem when doing the copy code. You need a root folder for each resource before you can upload anything. Jon added a comment to the code about fixing it, Matthew did some more work on that more recently. > In detail: I'm trying to upload files from multiple resources (two > pigeonholes and one logbook). All works well while I am only uploading > from the first resource. As soon as I try to upload anything from a > second, the code tries to create a root folder for that resource with a > null parent ID and a blank name. Without looking the code again, I think the null parent id indicates that it's the root folder for that resource. I don't remember it having a blank name... > It then fails because "Cannot insert > duplicate key row in object 'uploaded_files' with unique index > 'uploaded_files_unq_name'". > > I've not changed the logbook code for a couple of years; it's used in > production, yet it also exhibits this behaviour. What am I missing? Don't know if I'm being thick, but what are you trying to do? Have you written some code to automate file uploads in multiple areas, or is this all through the usual interface? Colin -- ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org |