{"action":"created","issue":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/1488","repository_url":"https://api.github.com/repos/foosel/OctoPrint","labels_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1488/labels{/name}","comments_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1488/comments","events_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1488/events","html_url":"https://github.com/foosel/OctoPrint/issues/1488","id":176255719,"number":1488,"title":"When a print is active, the folder is locked ( can't upload any files )","user":{"login":"Eriobis","id":9793935,"avatar_url":"https://avatars.githubusercontent.com/u/9793935?v=3","gravatar_id":"","url":"https://api.github.com/users/Eriobis","html_url":"https://github.com/Eriobis","followers_url":"https://api.github.com/users/Eriobis/followers","following_url":"https://api.github.com/users/Eriobis/following{/other_user}","gists_url":"https://api.github.com/users/Eriobis/gists{/gist_id}","starred_url":"https://api.github.com/users/Eriobis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eriobis/subscriptions","organizations_url":"https://api.github.com/users/Eriobis/orgs","repos_url":"https://api.github.com/users/Eriobis/repos","events_url":"https://api.github.com/users/Eriobis/events{/privacy}","received_events_url":"https://api.github.com/users/Eriobis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/foosel/OctoPrint/labels/status:awaiting%20information","name":"status:awaiting information","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-11T17:54:15Z","updated_at":"2016-09-12T12:38:02Z","closed_at":null,"body":"#### What were you doing?\r\n\r\nI am uploading files via samba to the raspberry pi. Everything works fine while not printing\r\n\r\n#### What did you expect to happen?\r\n\r\nThe file to be uploaded as usual\r\n\r\n#### What happened instead?\r\n\r\nThe file is being deleted ( there's no error while dragging the file onto the remote folder )\r\n\r\n#### Branch & Commit or Version of OctoPrint\r\n\r\n1.2.16rc1\r\n\r\n#### Printer model & used firmware incl. version\r\n\r\nPrusa I3 MK2, FW version 3.0.8\r\n\r\n#### Browser and Version of Browser, Operating System running Browser\r\nChrome xxxx on Windows 7 ( this isn't browser related )\r\n#### Link to octoprint.log\r\n\r\npastebin.com/g3rkzcJb\r\n\r\n#### Link to contents of terminal tab or serial.log\r\n\r\nThe file is empty\r\n\r\n#### Link to contents of Javascript console in the browser\r\n\r\n\r\n#### Screenshot(s) showing the problem:\r\n\r\n\r\nI have read the FAQ.\r\n\r\n### Other Notes\r\n\r\nThe configuration is \r\n- Upload folder : /home/pi/.octoprintx/uploads/\r\n\r\nAnd the watched folder is the samba one\r\n- /home/pi/gcodeUploads\r\n\r\nI am running 3 instances of octoprint, the watched folder is shared, not the uploads ones\r\n"},"comment":{"url":"https://api.github.com/repos/foosel/OctoPrint/issues/comments/246334125","html_url":"https://github.com/foosel/OctoPrint/issues/1488#issuecomment-246334125","issue_url":"https://api.github.com/repos/foosel/OctoPrint/issues/1488","id":246334125,"user":{"login":"foosel","id":83657,"avatar_url":"https://avatars.githubusercontent.com/u/83657?v=3","gravatar_id":"","url":"https://api.github.com/users/foosel","html_url":"https://github.com/foosel","followers_url":"https://api.github.com/users/foosel/followers","following_url":"https://api.github.com/users/foosel/following{/other_user}","gists_url":"https://api.github.com/users/foosel/gists{/gist_id}","starred_url":"https://api.github.com/users/foosel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foosel/subscriptions","organizations_url":"https://api.github.com/users/foosel/orgs","repos_url":"https://api.github.com/users/foosel/repos","events_url":"https://api.github.com/users/foosel/events{/privacy}","received_events_url":"https://api.github.com/users/foosel/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T12:38:02Z","updated_at":"2016-09-12T12:38:02Z","body":">Can you specify why the method of having the \"uploads\" folder of multiple instances pointing to the > same folder isn't good ?\r\n\r\nBecause the \"uploads\" folder does not only hold the files itself but also metadata for the files in .metadata.yaml, and concurrent access to that file will also cause things to break.\r\n\r\nAnd as already said in the above mentioned video, OctoPrint also not just copies uploads in there but also sanitizes the filename to make sure it doesn't cause problems in certain settings - when you move stuff in there manually, that sanitization step is skipped and things might stop working.\r\n\r\nIn a nutshell: OctoPrint's uploads folder should not be manipulated manually (it will break less easily with 1.2.16, but it's still something OctoPrint expects not to be manipulated externally) since OctoPrint does some record keeping and sanitization in there and expects to have full control over everything that goes on in that folder, including the uploaded files and their metadata - messing with either while OctoPrint is running will cause problems, even if only from other OctoPrint instances. OctoPrint's watched folder can be shared across a network, but should NOT be shared among multiple OctoPrint instances, or they will interfere with each other when processing anything that's copied into it. It should be viewed as a temporary \"write-only\" folder, which you drop files in to have OctoPrint do its thing with and then delete the copy in the watched folder.\r\n\r\nI'm btw surprised that sharing the uploads folder across three instances did not cause spectacular failures, considering that every uploaded file would have hit the GCODE analysis on all three instances and the resulting metadata would have been attempted to write back by three instances near consecutively O_O\r\n\r\nAnyhow.. if it's ok with you I'd rather mark this as a feature request (something along the lines of \"support a centralized uploads folder shared across multiple OctoPrint instances\"). As it is now, it's not a bug but rather a design limitation."}}
{"actor":{"display_login":"foosel"}}