Telescope / Meteor Image URLs and Hosting - meteor

I'm trying to change the logo for my Telescope app. Where should I place the image file? I can't seem to figure out what the correct file path (URL) should be.
Also, I use Bluehost.com for my web hosting. How do I deploy what I'm making to a web host? Can I just upload the directory?

A simple solution is to place your logo under the public/img directory of your Telescope app.
Then inside the Settings panel, enter this value :
/img/codehunt_logo.png
Later when your app will be deployed to production, you will have to change this value to the following :
http://codehunt.com/img/codegunt_logo.png
Concerning the deployment, the recommended way is to use Meteor Up.
Telescope author made a video specifically about deploying to Digital Ocean + Compose.io, but you can use any other combination of services. (eg. AWS + MongoLab, etc...).
You'll find more info inside Telescope documentation.

Well in Meteor app all your images should be in public folder, you don't need to specify the complete path name... Just the name of image does the job!
No idea about the deployment!

Related

Firebase dynamic links on customdomain rewrite in hosting but how

I've setup a custom domain to use for firebase Dynamic Links. Hosting has been setup in Firebase Console and I tried to use dynamic links without the customdomain, but just a xxx.page.link.
Now I want to return to use the custom domain, but from the console I'm told that:
A configuration already exists for this site. Add the snippet below to your firebase.json file and redeploy your changes. Be sure the rewrite rule is the first match for your dynamic link.
I'm not exactly sure how to handle this. Should I use the CLI and init a project to make this change or can I somehow do this from the portal itself.
If I need to use the CLI, how do I then access the existing project and make the change?
It seems you're already using Firebase Hosting outside of just for Dynamic Links. In that case you'll need to configure it through the CLI.
The configuration for Firebase Hosting must be made through deploying the firebase.json file through the Firebase CLI. There's no way to configure this directly in the Firebase console.
You can create an empty directory, run firebase init in there, and configure it to your existing project. Once that is done, you can create and deploy the minimal firebase.json file required as shown in the documentation on setting up your custom domain.

Local Silverstripe instance site pointing to live site for assets

I have an instance of Silverstripe that we have copied off a webserver that we host. We are trying to get it running locally so we can modify it but when I run it locally all assets point to the live site. Also I cannot access the login, or Admin pages of the CMS.
When I try access any local pages it states "Server Error" in the page content
Is there a place in the code where I can change the paths to assets to local, and also access the Admin area?
Assuming you're running a local copy of the database, and don't have any exotic changes to the way File is handled SilverStripe should be resolving file paths using the BASE_PATH and BASE_URL constants.
For logging in you'll want to add to the bottom of mysite/_config.php locally something like:
define('SS_ENVIRONMENT_TYPE', 'dev');
SSViewer::set_source_file_comments(true);
ini_set('display_errors', 0);
error_reporting(E_ALL);
Security::setDefaultAdmin('admin', 'admin');
// Email::setAdminEmail('admin#example.org');
define('SS_LOG_FILE',dirname(__FILE__).'/'.basename(dirname(dirname(__FILE__))).'.log');
ini_set('error_log', SS_LOG_FILE);
Director::set_environment_type('dev');
This should give you enough debug information to solve most issues.
I would use something like https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ (which also works for Silverstripe), to do a search and replace for all occurences of the old domain.
This would mainly work for images paths that are inside of content fields of course. Otherwise, SS should automatically convert the paths, as the accepted answer suggests.

AWS Elastic Beanstalk Asp.Net : Cannot view image under my domain after uploading

I have installed AWS SDK for .NET, and by using the toolkit for VS2013 I managed to deploy my application with no problem. The ElasticBeanstalk creates the bucket automatically and names it like elasticbeanstalk-eu-west-1-416461029999
The application has a file uploader which saves the user selected file under the bucket above. My problem is I can view the image by the AWS Explorer, but I would like to view the file by a browser under the domain like www.mydomain.com/Images/filename.jpg
The documentation for static sites says the bucket has to have the same name as the domain name, but the Elastic Beanstalk names the bucket automatically and it is not possible to change it after...
I would really appreciate any help, thanks...
1) First of you have to set ACL permission (Public Read,Write) for particular file
2) you could not use to see image directly Bucket URL. AWS provide "Distribution URL" for file display or view. so you can view file using Distribution URL

How to use Windows Azure CDN with existing ASP.NET webforms application?

I have an ASP.NET Web Application on Azure and want to move my static content - images, CSS to the Azure CDN.
I have over 100 image files being used throughout the application stored in a folder "App_Themes/img" ...
In what way, can I minimize the effort in the move?
My current steps would be ...
- Manually upload all files to cdn ..
- Manually change all urls to the cdn (using Ctrl-H, but still is time-intensive and not error free)
- Somehow manage the testing locally... (Add some code at every page to use a baseurl, depending on debug or release) ...
Is there any way that I could add a new route, etc so that I don't have to manually change the urls, as well as move between file-system urls and CDN to develop the application locally and deploy it.
Thanks a lot ..
I think you can do this via IIS URL rewriting or move static content into a /cdn folder, I haven't tested this but Maarten Balliauw has a great blog post on how serve content from the CDN. "Using the Windows Azure Content Delivery Network"
What I did was added a config entry in the web.config:
and replaced path /App_Themes/SpringDoctor/images/ with <%=System.Configuration.ConfigurationManager.AppSettings["ImagesPath"]%>
And upload all images to the appropriate blob.

ImageUrl trying to display an image outside of project root

I am working with two different web sites in asp.net. In the first project i upload some images to a specific folder under the project root and save just the filename in the database, now i am trying to display this images at some page of the second project I know the filename from the database and the image folder as absolute pat but I have not been able to display the image, even thought when looking in firebug the image src is correct src="D:/MyFolder/image.jpg" the image does not display, probably because it is not pointing in the right directory.
I have also tried using Server.MapPath and then my D location but still no success.
I am sure someone has faced the same situation before and was really hoping to get some hint to manage this.
Thank you in advance
I found my solution, strange but i didn't catch it before. Uploaded pictures under a project can always be accessed using the url of the project http://www.yourwebsite.com/images/photo.png now in the second project you can use reference the images using this url and concatenating the file name which i store on database. I think this is the best solution and without changing the code access security which i think can bring other problems with it. Anyway thank you guys.
If you want to display the image that is not in your project (I mean it is present in some other project or some other drive) just create the virtual directory in IIS
Go to "Run", type inetmgr
Right click on your project and add virtual directory
Give alias name and path so that it acts like folder in your project
I don't think you can serve files outside of your application path by default. It's called Code Access Security. You can read up on it here:
http://msdn.microsoft.com/en-us/library/930b76w0.aspx
You can fix this by changing your trust level to High in your web.config:
http://msdn.microsoft.com/en-us/library/tkscy493.aspx
I wouldn't recommend doing this for any site that is externally accessible. In fact, depending on how/where you're hosting your application, this option may be restricted.
You can only "link" to files that exist relative to the same project or are hosted on another site via an absolute URL.
If you want to service files outside the application/website (on disk or in a database) you will need to build a mechanism that gets the file and binary writes it to the browser, setting the MIME type etc. This is best done using an HttpHandler.

Resources