Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 380828

Summary: Import single file not working
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: antonm
Version: 0.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2012-05-28 14:28:04 EDT
0.5 M2

- Create a folder
- Select it and choose "Import local file"
- Click the "Upload" button.
- Select a non-zip file (I used PNG)

Error occurs:

{"HttpCode":400,"DetailedMessage":"error in opening zip file","Message":"Failed to complete file transfer on Bw/test","Severity":"Error","Code":0}

Note dragging a file to import works, but selecting from dialog does not.

Also note the error is not shown to the user so it appears that nothing happened.
Comment 1 John Arthorne CLA 2012-05-28 14:28:30 EDT
Might be a request header problem but I'll take a quick look.
Comment 2 John Arthorne CLA 2012-05-28 14:29:04 EDT
(failure was in Chrome 19.0.1084.52 m, Windows 7)
Comment 3 John Arthorne CLA 2012-06-07 14:52:42 EDT
It is looking like a client side bug. When using the "Upload" button it uses the dojox Uploader widget. The POST received on the server doesn't even contain the filename, so we can't even do server-side logic to determine whether unzipping is appropriate. We need at least the filename somehow so we can figure out what to do with the file.

There is a Dojo bug here mentioning wanting to add extra headers to the POST request on upload. This implies that there is no way to do this today:

http://bugs.dojotoolkit.org/ticket/14768

For 0.5 maybe we just remove the button and only allow drag import?
Comment 4 John Arthorne CLA 2015-05-05 14:43:25 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html