Gltf 404 Error : Can't Host on Server - http-status-code-404

I'm new to Gltf files and am trying to host a file exported using Kronos' Blender export. Seems to export my file fine but I am getting a 404 error when using A Frame to load it AND when I try to directly paste the path in a browser.
When I link to a CDN of an existing gltf ( say this avacado ) it functions fine and if I go to said path in a browser it downloads the gltf.
<a-asset-item id="house" src="https://cdn.rawgit.com/KhronosGroup/glTF-Sample-Models/9176d098/1.0/Avocado/glTF/Avocado.gltf"></a-asset-item>
Yet once I download that Avacado.gltf and host it on my server ( or on other servers I have access to ) and go to the direct path, sure enough, there is a 404 error.
Is gltf not recognized or is there something specific i need to set up in order for this to work?

The gltf file has references to multiple other files (e.g. .bin file, textures)
The avocado seems to have a .bin, and multiple .jpg's, which need to be together with the .gltf file.
Link to the avocado <- Check out how many files are there in the catalogue.

Related

How can i download a sample xlsx file from public resource folder in React js

I'm trying to download a sample xlsx file from public folder in React js in the following way
<a
href={process.env.PUBLIC_URL + "/my-file.xlsx"}
download={"my-file.xlsx"}
>
Download file
</a>
i am stuck at this. downloading this way works locally, but when deployed to public, it fails and instead downloads just an empty corrupted file. Any ideas on that ?
Why the file is being corrupted on the server, although it works fine locally?
you should use relative path of file for href,
ex: href={"../../assets/files/my-file.xlsx"}
and dont do this "download={"my-file.xlsx"}"
instead write download={true} or only download

Why is json files not accessible after build?

I have a project in react that works on the computer excellently.
But after I do build and upload it to the server all the json files in the public folder get a 404 error (even when I try to access them directly and click on the url I get the same error.)
But the icon and png files from the same folder do appear.
Another problem (which is probably also related) is that when I go through the link pages on the site it goes great. But if I type them directly in the url I get a 404 error message
I tried to add to json
"homepage": ".", "
But even that did not help.
Anyone have an idea?
edit:
the json works .. I had to change the settings of the mime types according to the instructions: https: //docs.plesk.com/en-US/obsidian/administrator-guide/website-management/websites-and-domains/extended- website-management / using-virtual-directories-windows / adding-and-removing-mime-types.65216 /
But I was still left with the problem that when I go directly to the url address it makes me an error page (when the project is on the local host, it works fine!)
Regards,

How can I call ReactJS chunk files via sharepoint master page without webpack configuration

I developed an application with ReactJS and got chunk files with npm run build. But how can I call these files via sharepoint master page. I just add the main chunk files to master page and loaded it but it never called the component and it doesn't render.
I uploaded the below files to the SiteAssets folder in SharePoint. I just the call main.553276c9.chunk.js via master page.
0.45984e43.chunk.js
0.45984e43.chunk.js.LICENSE.txt
0.45984e43.chunk.js.map
3.e5ccfe13.chunk.js
3.e5ccfe13.chunk.js.LICENSE.txt
3.e5ccfe13.chunk.js.map
4.bdcd656e.chunk.js
4.bdcd656e.chunk.js.map
5.41ddc0b8.chunk.js
5.41ddc0b8.chunk.js.map
6.cc7d4939.chunk.js
6.cc7d4939.chunk.js.map
main.553276c9.chunk.js
main.553276c9.chunk.js.map
runtime-main.85cbbfa2.js
runtime-main.85cbbfa2.js.map
Most build systems that generate files like this should also generate an index.html file that should load and run your app. You should upload that html file, along with all js files, and run your app from that.
If you're using Create React App with react-scripts the index.html should be in build/index.html.
According the documentation runtime-main.85cbbfa2.js is file to include.
runtime-main.[hash].js
This is a small chunk of webpack runtime logic which is used to load and run your application. The contents of this will be embedded in your build/index.html file by default to save an additional network request. You can opt out of this by specifying INLINE_RUNTIME_CHUNK=false as documented in our advanced configuration, which will load this chunk instead of embedding it in your index.html.
Just note that that filename will change when the code changes. The build process will update your HTML file, with that new filename. So you definately want to be in the habit of uploading that.

AngularJS 1.2 Not allowed to load local resource

I know it would be great if the file wouldn't link to local resource, but using phonegap/steroids framework, FILE_URI returns "file:///Users/" path which I can use for uploading to S3 or else, but Angular won't show it in the template.
Is there a possible solution? I tried adding config to my app
.config(function ($compileProvider){
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
})
but it seems that doesn't have impact on the error.
I can base64 encode my images (then works), but I would like to avoid this if possible.
thanks
See the Camera example in the Steroids Kitchensink app, where the Cordova File API is used to move the picture from the tmp folder to the Steroids app's User Files folder. Since Steroids's localhost looks for assets both in the App folder and User Files folder, you can use an absolute path, e.g. src="/my_image.png". See also the App Structure on Device guide for more information on the App and User Files folder.

ubercart file download setting problem

Hi I am using drupal 6.x and ubercart 2.x. I trie dto create a product,but when it comes to add the file download feature I am getting some issue. I put a folder called downloads in the drupal folder and one file inside the download folder.then I gave the path as "drupal/downloads but it is telling that drupal/downloads is not a valid file or directory"
I tied the following file paths too
1.www.mysite.com/drupal/downloads/faq.ods
2.drupal/downloads/faq.ods
3.drupal/faq.ods(after putting faq.ods in the drupal folder.
But still I am getting the same message. Plesae some body help me
It is looking for a path rather than a URL. You should probably aim to find out from your hosting company what the absolute path for your webroot is (e.g. www.mysite.com may actually be on disk as /users/mysite.com/httpdocs) and put in that followed by /drupal/downloads

Resources