Open gregtoth opened 10 years ago
It expects an app that was exported from coder. If you create a new app, go to its settings panel in the editor, and click export, you can get a zip of that app and see how it's supposed to be structured. This makes it easier to pass an app around between devices or to do a quick backup of a project.
Hope this helps! On Sep 18, 2013 11:11 AM, "Greg Toth" notifications@github.com wrote:
When creating a new app, there's an "upload" button. What can be uploaded and what's the expected format/structure? Tried uploading a entire .zip file clone of an entire app but that doesn't seem to work.
— Reply to this email directly or view it on GitHubhttps://github.com/googlecreativelab/coder/issues/24 .
That's what I thought. Seems to be an issue for me related to re-zipping a directory using Mac 'compress'. Causes 'Invalid application bundle' when upload. Steps: Export existing app to zip file, unzip, re-zip using Mac 'compress', create new app in the UI, click Import button, select re-zipped file, and try to import. Generates 'Invalid application bundle' at that point. Importing the exact-same Export zip file works fine.
Strange. I'm curious about what could be different. You're right clicking the directory and hitting compress? On Sep 18, 2013 11:39 AM, "Greg Toth" notifications@github.com wrote:
That's what I thought. Seems to be an issue for me related to re-zipping a directory using Mac 'compress'. Causes 'Invalid application bundle' when upload. Steps: Export existing app to zip file, unzip, re-zip using Mac 'compress', create new app in the UI, click Import button, select re-zipped file, and try to import. Generates 'Invalid application bundle' at that point. Importing the exact-same Export zip file works fine.
— Reply to this email directly or view it on GitHubhttps://github.com/googlecreativelab/coder/issues/24#issuecomment-24674622 .
Yes. Will try command line zip to see if works any different.
Same issue if zip from command line.
I see the zip files in /tmp on the pi, and can unzip them. They contain a bunch of __MACOSX directories with additional dot files in them such as .DS_Store, ._app, etc. Wondering if that is causing problems.
I think I found the problem, will test. When you compress a directory, the directory name is at the root of the paths in the zip file. The js import code isn't expecting an additional directory layer. Let me test this and I'll report back.
Yes, that's the problem!
Cool. So I think you can select the files rather than the parent directory, and compress them. That'll let you mess with things outside of Coder and then pull it back in.
Sure - it's fine for me. Wouldn't be too hard to automatically handle in the upload code on the pi for everyone else. Looks like would just need some additional logic in completeImport() and alter tmpfolder by appending the additional directory level.
I added code to the app uploader to transparently handle extra directory level and sent a pull request.
When creating a new app, there's an "upload" button. What can be uploaded and what's the expected format/structure? Tried uploading a entire .zip file clone of an entire app but that doesn't seem to work.