Images not showing up in hosted site - firebase-hosting

Thanks for taking the time to look at this, I've researched as best I can but am not coming up with anything. I saw a similar stack overflow post about waiting for images to be done processing, but I've been waiting for about 2.5 hours and the images are still missing.
I am using angularfire with Firebase. I am using grunt build to create a dist folder and that is what I am deploying to Firebase. The dist folder contains an images folder and firebase says it's uploading 780 files when it deploys (before I added the images it was about 25).
However, the images just don't seem to show up. The URL pattern is my-app.firebaseapp.com/images/image-name.jpg
My firebase.json file is shown below, it's pretty basic.
{
"firebase": "<redacted>",
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
The app itself deploys just fine and works, all the images are just 404ing. I apologize in advance for what I am guessing is something very basic that I'm missing.

After Redeploying a million times to no avail, I figured I had to troubleshoot and figure out what was wrong. I inspected the url for the file i.e. https://exampleApp.firebaseapp.com/img/myimg.png or whatever it is in your case. In essence my problem was simply case sensitivity. So instead of myimg.png the file was stored as myimg.PNG. So just check if that extension is your issue.

It is probably because the src, rel, and href tags contain absolute urls which causes firebase issues while getting to the right file.
What you must do is, get all the URLs to be relative, such as: images/image1.png
you must do this even with your css and js links.
Also, you must store every thing in a folder named public, or you will have to change the name to your directory while prompted in the command prompt regarding to use specific directory as public.

So, I sort of solved the problem. Grunt's imagemin thing during the build process did "something" to the images that caused them to not display. I will figure out what eventually and hopefully remember to update this post in case others run into this in the future. But in the meantime just replacing the built images folder with the source fixed the problem.

Related

Cannot upload files for release in Github

I want ot create a release for my Github project, but when I try to upload my binary (which is a .zip file) to the release, I get the following error message:
Something went really wrong, and we can’t process that file.
I get the same error message if I try to upload some other files (e.g. my readme file). What could be wrong?
Check first if this issue persists with all browser.
I have seen this error message before, where the upload succeeded with Chrome, but not Firefox.
For the record in my case this was due to an obvious mistake: I had to authorize a github script in NoScript.
If someone encounters this problem in China, and is using ShadowSocks, try turning ShadowSocks off.
I was trying to upload an image file in png format on chrome browser but I was getting the same message.As suggested in one of the answer, I turned off windows firewall and it worked.
But my mind was not satisfied and I turned on Windows firewall and converted that image to jpg format and it got uploaded.
But this stubborn mind was not satisfied and told me to upload this in .png format only.God came to my rescue and accidentally properties tab of png image got opened and at the bottom of tab, it was showing
"This file came from another computer and might be blocked".
So I unblocked it and it got uploaded.
I got that error due to my companies firewall that prevents all file uploads. Might this be the cause of your problems?
The problem occurs during file upload because I was using VPN which doesn't allow file upload hence I disconnected from VPN and then try uploading which work absolutely fine. So my advice to check your firewall/VPN settings as mostly Organization doesn't allow fileupload in GIT due to security concern.
I got the same problem on Opera browser(Ubuntu 18.04.1).
Then I realized that my browser does not have permission to access the related(where your files located) partition. I moved the files that I wanted to upload on Github into accessible partition by Opera browser in my HDD, Thus I could be able to upload my files to Github.
It worked like a charm. Hope this helps.
clear your browser's cookies and cache ..after clearing files will be uploaded easily on git without error
In my case. I'm reuploading two zip files to an existing release. One success and another one failed. Tried in both chrome and firefox.
My solution is to use the hub command-line tool.
I use the below command to edit the existing release and attach files to it.
hub release edit --draft=false --attach FILE TAG
For some reason, I had to change its prefix from .png to .jpg and it worked.
I had the same problem which I solved by disabling my firewall. I hope this will work for you
In my case, it was my anti-virus (AVG) preventing the upload.
In my case, Avast antivirus was blocking the objects-origin.githubusercontent.com site, and made the upload fail.
After disabling the antivirus, I was able to upload the files.
Well! That is because your are uploading some images that you have downloaded from the internet like in my case I have used a favicon that is generated from website to solve the issue Image with security details~img1
Image with detail~img2
Remove personal info ~ img3
To solve the problem
first of all head to the images that you have downloaded from internet and right click on image and click on properties
check the unblock checkbox as shown in image 1 and then
click on the details tab as shown in image 2 and then click on the remove properties and personal information
And then check on the remove the following properties on the file as shown in image 3
And then click on ok and then again ok
The given solution will solve your issue it just worked perfect for me
Files cannot be uploaded because your network provider doesn't allow, use different network or apply vpn for uploading the files.

Files get uploaded as Type: Folder in Google cloud storage

I have been uploading .jpg files to GCS for a while and I have not changed my code which does this operation in the last 5 months.
About a month ago, I started to realize that some of my uploaded image files started to get listed as Type:Folder instead of Type:image/jpeg as they used to be.
The UI of the GCS has changed around a month ago and I have a feeling something in the background had also changed and it is either a Google bug (unlikely) or I have always been uploading the pictures the wrong way (Potentially with some wrong metadata or something that prevents GCS to recognize them as image/jpeg) and it just caught up to me with Google updating something.
Before I start digging deeper into my speculation of metadata, I wanted to ask here if anybody else has encountered the same problem. If yes, what was the fix?
Summary: no code change, around a month ago, GCS web UI started to list my "image/jpeg" as "Folder". Is anybody aware of a change from Google side that could make this happen?
I solved the issue.
I had this code right before sending the file to the server;
String contentType = URLConnection.guessContentTypeFromStream(stream);
this fails to recognize that it's image/jpeg because the picture's metadata is destroyed during all the image processing I do earlier.
Now, I hardcoded it and it works as follows
String contentType = "image/jpeg";
Solution: specify the contentType of the file before sending it to the server.

cannot find image of webite header in joomla

Am just beginning with joomla on a site that is already existing and was previously managed by someone else who is not available at the moment. I am trying to troubleshoot a problem why the website is displaying the header differently in different PCs but I am not being able to find the image of that header file. I tried to look for it under "site > media" but cannot find the image among the images in that area. I also tried to look for the path to the image through the template css and found this path ../images/logo.png which I believe must be the path to the header image but I honestly don't really know which path ../images/logo.png is but assuming it is the one under "media" then I still cannot find the image. Could you give me a clue on where the header image files could be found cause I've actually still failed? Or, could you make me understand this path ../images/logo.png or how to find an image on a joomla admin interface like say "logo.png". In fact I discover that on looking at the CSS for the template, the image paths found in it are not found in "Media"? Is there another path for the images in the template and how do I access them? I cannot FTP my host at the moment to view the physical files due to the long procedure needed so am hoping that there is a way to find it. I only have joomla admin access and nothing like Cpanel as yet. The joomla version of the site is 1.5.22 which I know is an old one but I plan to do first things first. Hope I've given enough infor.
Try using FireBug, or Chrome debugger - (press F12) and check "Click an element in the page to inspect" to see where the specific image is located exactly.

FMS VOD streaming: How can I access content that was uploaded to the webroot/vod directory?

I have recently started working with a fresh install of FMS 4.5.0 and am having some issues getting my media to load with the VOD application.
After uploading some of my own FLV/F4V content to "/webroot/vod/", I am currently only able to load the samples from the installation.
Is there some sort of configuration that needs to be made to access my media?
Do I need to create a manifest for each video?
I have been running tests through:
http://www.osmf.org/configurator/fmp/
And have had luck accessing the videos that came with the install by using the following:
Video Source (URL): http://[my host]/vod/sample1_1000kbps.f4v
But when I change this to point to one of my recently uploaded videos it fails everytime.
Another strange note, I was able to play one of the samples but then I changed its name and it was still able to load that one specific video using the same filename when the file's name had changed. This leads me to believe that it isn't really loading the right files or perhaps I am uploading to the wrong directory. But I can't find any other directories that have video in them.
Please let me know if there is any more info you need to help me. I'm fairly new to this and am not sure what to include.
Thanks in advance for any help!
EDIT: This was a pathing issue.
This has been resolved.
Apparently my webroot directory for the server was not set up correctly and after it was pointing to the right directory it was fixed.

Retrieving updated files from server to replace files on documents folder of an iPhone

Im new to iPhone programming and wanted to see how people have solved this problem:
Ive created my app which will ship with certain pLists and .png files in the main bundle. However, what I want to do is when the app starts up, Id like it to check my server to see if there are updated versions of the files in the documents folder available. If so Id like the app to download those files.
I was wondering if someone can point me to some resources on how to do this? Ive searched online but haven't come up with good hits.
Whats the google key-word for searching this topic anyways?
Thanks a lot
you can use NSUrlRequest to download the files, to move them to the correct place you can use NSFileManager, if you look at the apple docs for both these classes there should be sample code explaining how to copy/save a file from NSData, and also how to download it.
I don't have any example resources of how to do exactly this, though I would probably do something along the lines of onAppLoad checking to see if the content of the application that you want to keep updated is the most recent, and if not, download it.
As for keywords to search I would try something along the lines of "Automatic App Content Updating/Verification" and throw in "iOS/iPhone/iPad" or some similar combination.
I'll do some more poking around and shoot you a comment notification if I find anything worthwhile, and then edit my post with it.