This is very strange. I developed an ASP.NET web site that in some part of the code, it validates if a file exists, by mean of the following method:
File.Exists(Server.MapPath(archivo))
That method returns false even when the file exists.
When I point the browser directly to the PDF, I got a 403 forbidden error.
Containing folder has about 81,000 files.
If I copy that PDF file to other directory, where that file is the only file there, I can point the browser there and the PDF is shown.
What may be happening here?
EDIT:
Added Hidden Segments screenshot:
Thanks
Jaime
Related
I am using postman(9.31.13) and I have got the following warning when I upload the file to send the body as a form-data.
"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can set up your working directory in Settings." How can I solve it?
We are uploading a pre built static site to gh pages using the .nojekyll file in the root folder. However if we use pretty URLs without the .html extension then all of our links present the user with a file open/save as dialog because the browser thinks it's file octet stream.
As we are not using Jekyll do we need to have a _config.yml ? Either way with or without cant get pretty urls to work.
I hosted a small django project on virtual machine on digital ocean. Before I started using digital ocean to serve static files everything worked fine. But immediately I created a storage space and push my static files there the static files are not being served on the webpage, including django admin page (the project pages are showing net::ERR_ABORTED 403 (Forbidden). I have already installed django_storages and boto3.
I got some hint as to the possible cause of the problem when I clicked on digital ocean aws bucket url that looks like https://django-space-storage.nyc3.digitaloceanspaces.com. When I cliked on it I got the following error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
It seems the browser is rendering my django pages as xml instead of html. I might be wrong with this assumption because I'm finding a hard time trying to understand what is actually going on. My question is, how do I cause the browser to render my django pages as html instead of xml?
In my application I have a functionality where user can upload his resume(of format .doc,.docx,.pdf). I'm using Ionic File Choosing plugin to choose the file and to upload I'm using Ionic File Transfer plugin. It is known that the file transfer plugin expects fileName filed in FileUploadOptions which will be the name of file to be uploaded with it's extension. In my case say resume.pdf/doc/docx.
For getting the file extension I'm passing the chosen file's path to Ionic File Path plugin which will resolve it to it's native path.
The whole process is working absolutely fine when the file is chosen from mobile's native file system.
But when the file is chosen from drive/cloud application the Ionic File Path plugin throws error cannot be resolved to native path.
As I'm not able to resolve file path to it's native path I'm not getting file's extension.
When I'm not aware of file's extension it is not possible to upload the file to my server. (if I keep filename field empty in FileUploadOptions, by default name.jpg will be taken which may not be the type of file that I'm trying to upload).
Please suggest how can I get the extension of file that is chosen from drive or how can I upload a file without default filename field in FileUploadOptions.
7.It's similar to this question ionic 2 How to download file from Google Drive and I-cloud as there is no proper answer for this question I'm reposting it with further explanation.
Finally I found solution for this problem. I have created a public github gist where I have explained the solution. The link for it is as below
https://gist.github.com/coolvasanth/d042a26deda75f5e390b42b87995f30d
I've been messing around with AWS lately and it definitely great. As a first test I'm trying to host the most basic static website via S3. The site is simply just one html file and a few javascript, css and image files.
Whenever I load the static URL the only thing that loads is the index.html file, its contents and for some strange reason the only image that loads is my avatar, yet all the images are stored in the same folder. All of the css, js and image files are also written as relative links too of course.
I've made sure all the files and folders permissions are set to "world" multiple times.
I also looked at the network tab in dev tools and its giving me 200's on every GET request.
I'm completely stumped as to why this is happening. Does anyone have an idea of what I'm missing?
The url is available at http://www.mikefisher.io.s3-website-us-east-1.amazonaws.com/
I should add that the site works perfectly locally as well as on a traditional web server.
I checked my browser console and it gives me this error which I think might have something to do with it.
Resource interpreted as Stylesheet but transferred with MIME type binary/octet-stream:
Fixed it!
The issue I was having is the metadata for the CSS files in Amazon S3 were set to 'binary/octet-stream' by default.
The way I fixed this was selecting the individual files in the bucket, clicking the properties tab, then in the meta-data section typing in 'text/css' as the value.