I'm new to Heroku and I'm looking for a way to upload a bunch of images to my application's directory. Is there a proper way of doing this, like a ssh, or a filesystem access, or something?
Thanks in advance
I'm not sure what you mean, but I would just add them to the git and upload them like all other documents. Like so:
git push heroku master
Hope it helps!
Related
I'm making a pretty simple website and I have a feature that allows users to upload an image for their profile which is then saved in an uploads directory.
It seems to work fine, however when I push a new local version of the site out I lose all the uploaded files. I'm not exactly sure where Heroku stores them, is there a way I can push those to GitHub or another solution?
It seems like you want data from heroku app to your repository, if i understood your question correctly. Then try this:
https://blog.heroku.com/push_and_pull_databases_to_and_from_heroku
Heroku's filesystem is ephemeral. If you want to store user uploaded content, you need to use something like S3 to store the files.
I have a Laravel app in Github.
Say, the URL of the app is this-
https://github.com/abrarjahin/laravel_migration_test_upwork
I came to know that there is an easiest way to upload any Laravel app from any branch of Github by some simple commands using Putty (it is so fast than uploading with FTP). And there is also way of running Laravel Migrations and Seeds using Putty.
But I can't find any solution how to do that.
So, can anyone please help, how can I upload server from Github and run migrations and seed ?
Thanks in advance for helping :)
I'm trying to get my pictures to upload on Heroku and have been unsuccessful. I have changed the
config.serve_static_assets = false
to
config.serve_static_assets = true
I have also looked through the Heroku manual and it is very unclear about this issue at least to me.
Does anyone have an idea how to get it to work?
I appreciate the help
Heroku is the wrong place to store you uploaded images they recomend using a system like Cloudinary that stores the images in the AWS (Amazon Web Services).
Ryan Bates has a really good video on how to upload images as well Carrierwave file uploads
When I upload documents using Erica into CouchDB it removes my rewrites. Is there a way to configure my rewrites in Erica? If so I've been unable to figure it out, any help would be great!
Aha! Got it! So simple... Just add a rewrites.json file to your app directory and it will push it up along with everything else.
This is my first post to this Forum, please forgive me if this has been answered elsewhere--I did search and was unable to find an answer to my particular problem, so any help would be greatly appreciated.
I am working on a WP site for a client who wants to upload images to new posts (who doesn't hey?). In setting up the site I have done the following:
1) Enabled File Upload by CHMOD default dir to 777.
2) Changed max file size.
3) Changed allowed filetypes to include necessary file types.
When I try to upload anything I get the following error:
“Bobst Expertfold 80 110 (Dec 2010).jpg” has failed to upload due to an error
The uploaded file could not be moved to /var/www/vhosts/glossopcartons.com/httpdocs/wp-content/uploads/2010/12.
The above error mentions 'glossopcartons.com', this WP site is actually sat on glossopcartons.co.uk. It's obvious that there is some kind of virtual host configuration going on and the image is trying to be uploaded to a folder on a different domain (glossopcartons.com instead of glossopcartons.co.uk).
I don't manage the hosting, I have just been assigned with the build. However, I have access to the plesk cpanel but I dont know what I need to do?
Does anyone know what is causing this problem? The site has actually been made live and this issue has been spotted after the launch(everything worked fine on the test server), and I am scratching my head trying to figure it out.
Is there something I can put in my wp-config.php or .htaccess file to tell WP to upload to a different location.
Any help would be greatly appreciated.
Dan
First thing is 777 permisions are too loose and will get you hacked; they should be no more than 755. Hardening WordPress « WordPress Codex
For the difference in URLs: that sounds like a DNS or virtual host config, but try adding the full URL path in Settings>>Media Settings. Might not work.
Why are there sites at both domains? Why not domain forward glossopcartons.com to glossopcartons.co.uk?
Make sure PHP lets you upload files larger than what you are trying to upload.
Experienced the same problem on several old sites. This problem occurs sporadically and is not commonly occuring on other websites on the same server
Try going to your "Media Settings" page... do you see a "Store uploads in this folder" option with a long path to your uploads folder? If so... this is your problem... WordPress 3.5+ does not seem to require this long path, but more of a site relative path (which is great!)
Change your "Store uploads in this folder" to "wp-content/uploads"... when you "save settings" you should see that field disapear entirely, never to bother us again ;-)
This occured for me when my hosting provider changed the folder structure on the server making this long URL incorrect. Therefore WordPress could not find the "uploads" directory at all.
Hope that helps...
Here's some things you might want to check in case your still having problems...
Update to WordPress 3.5 +
Update all plugins
Check file permissions 755 on the uploads dir/
Check PHP version