maidsafe-archive / safe_examples

examples showcasing various features of the SAFE Network
BSD 3-Clause "New" or "Revised" License
82 stars 50 forks source link

Sites in folders not recognised - 301 error #263

Closed JPL1 closed 7 years ago

JPL1 commented 7 years ago

Test 19 Create a folder 'newtestsite' Create a simple HTML file index.html within newtestsite Create a new service newtest using the Web Hosting Manager Upload folder 'newtestsite' to newtest-root Navigate to safe://newtest.jpl - Error: -301, NFS error: File not found safe://newtest.jpl/index.html - same error Add an image to the folder image.png safe://newtest.jpl/image.png - image gets found but not displayed properly

But

If I just upload the index.html file or image file without the folder it works fine

frabrunelle commented 7 years ago

This is because of the new behavior of the Upload Directory feature mentioned in the changelog of Web Hosting Manager:

Multiple selections of both files and directories in the upload actions are now supported by the Web Hosting Manager application. Note that now when uploading a directory it gets uploaded with its entire hierarchy, including the root directory which gets created on the target location. This is also applicable when uploading multiple directories.

We also added a note in the dev update to explain that we are planning to improve this:

Note: You might notice that it’s a bit more complicated to upload a website now, since you’ll need to upload the files and folders separately. This is because we added support for uploading subdirectories. Ideally, it would be possible to choose both files and folders at the same time, but it looks like Electron doesn’t provide the upload dialog option which will let users choose files and folders. Hence the current mashup of both options. So to upload your website, you might need to first upload the files from the root of the website by selecting all of them via the upload file feature and then choose the folders via the upload directory feature. This should be made better with the upcoming UI rework.