Comments (14)
Are you Wamp or Lamp based? If you are Lamp based hosting, you need to remove the firewall for post to work. please setenforce 0
from laravel-5-bootstrap-3-starter-site.
I use EasyPHP for simple. http://www.easyphp.org/
How about using Intervention Image at http://image.intervention.io/ this plugin seems quiet pretty and very simple to use.
from laravel-5-bootstrap-3-starter-site.
At least thumbnail generation isn't checking if thumbnail folder exist. Try adding to beginning of app\helpers\thumbnail.php this:
$thumbnail_directory = dirname($thumbnail_image_path);
if(!file_exists($thumbnail_directory)) {
mkdir($thumbnail_directory);
}
from laravel-5-bootstrap-3-starter-site.
I may have the same issue.
Did some debugging and noticed that Input::hasFile('picture') is always null in the controller.
from laravel-5-bootstrap-3-starter-site.
I have been looking at this issue for some time now. I figured out the issue is that pictures can't be serialized when the ajax call is being made. I am personally trying to work on a fix now and I have had success with it. The only problem is now with the folder being named www instead of public, it will take me much more time to fix because that is where ultimately the pictures should be stored, I don't really want to think about converting it right now.
from laravel-5-bootstrap-3-starter-site.
I hope somebody can implement third party image management like intervention at http://image.intervention.io/ This plugin is quiet easy to use. I couldn't figure it out in this starter app because of image naming convention is hashed with sha1. I was successful in implementing in my earlier app using laravel 4.2 and still trying for this laravel 5
from laravel-5-bootstrap-3-starter-site.
@douxlagithub https://github.com/Intervention/image (it has support for laravel 5)
@applecrusher you may be right - but it should a form POST request in the code.
@mrakodol - what platform are you developing on? I am asking, as I am seeing a lot of platform dependent EOL in the source files. May also explain why it may work on one platform vs another (just speculating)
from laravel-5-bootstrap-3-starter-site.
@nextpulse I am not sure what you mean by your statement to me. if you look at form.serialize(), files cannot be serialized, http://api.jquery.com/serialize/. That is why if you do Log::info(Input::all()), first import or "use Log;", you will see it missing the picture field in the log. The quick way I got around this was to simply avoid using the ajax call with the form. Rather I just closed the box and sent the form without preventing the default event. This is the quickest way of doing based on the way the code is written. However the draw back is no feedback on invalid saves. I had to also create the image directory as well.
from laravel-5-bootstrap-3-starter-site.
@applecrusher I didn't realize the code was doing an ajax form request!! Now I see the issue. Found a few typos and js/css not found issue in the same file (modal.blade.php). May have to rework it to bypass the serialization for file upload. Anyhow, thanks for the info - now at least I know where to look.
from laravel-5-bootstrap-3-starter-site.
So I did a quick 'hack' to make this work. For file upload forms, I added the id 'fupload' and amended modal blade. (Its ugly, but fixes it so I can at least proceed).
if (form.attr('id') == '' || form.attr('id') != 'fupload'){
$.ajax({
type : form.attr('method'),
url : form.attr('action'),
data : form.serialize()
}).complete(function() {
setTimeout(function() {
parent.$.colorbox.close();
window.parent.location.reload();
}, 10);
}).fail(function() {});
}else{
var formData = new FormData(this);
$.ajax({
type : form.attr('method'),
url : form.attr('action'),
data : formData,
mimeType:"multipart/form-data",
contentType: false,
cache: false,
processData:false
}).complete(function() {
setTimeout(function() {
parent.$.colorbox.close();
window.parent.location.reload();
}, 10);
}).fail(function() {});
};
from laravel-5-bootstrap-3-starter-site.
BTW: the code in the PhotoController for saving the photo album/photos is not recommended. The reason is that it does not leverage the laravel 5 file system. (Meaning it does not take advantage of changes to the default storage - local, s3 etc)
http://mattstauffer.co/blog/laravel-5.0-cloud-file-drivers
IMHO: Probably best to take sometime to rewrite the file upload/save code - that that we understand it a bit better. (I'll add to this thread based on any new rewrites that I do).
from laravel-5-bootstrap-3-starter-site.
To avoid hard coded paths (public_path() etc) in PhotoController, I took a deeper look at the Laravel 5 file system.
http://laravel.com/docs/5.0/filesystem
The best approach seems to be:
https://github.com/GrahamCampbell/Laravel-Flysystem
This means you don't have to hard code paths in PhotoController and have everything configurable via a config file. (Switch from local disk store to s3 etc).
from laravel-5-bootstrap-3-starter-site.
THX for advice and show me a bugs, but main problem is me not having enough free time to work on the project, I will tray to find some free time to do it well.
Until that, I hope that you understand me, and if someone have some free time to help, can make some poll request and I will approve it.
Sorry for waiting some new fixes :(
from laravel-5-bootstrap-3-starter-site.
This is the fix for this issue. It requires changing 1 line and adding three more variables. This also allows optional feedback.
In resources/views/admin/layouts/modal.blade.php change the ajax to the following:
$.ajax({
type : form.attr('method'),
url : form.attr('action'),
data : new FormData(this),
contentType: false,
cache: false,
processData:false
}).complete(function() {
// Optionally alert the user of success here...
setTimeout(function()
{
parent.$.colorbox.close();
window.parent.location.reload();
}, 10);
}).fail(function(jqXHR, textStatus, errorThrown) {
....... add error status right here
Let me know how this works for everyone.
from laravel-5-bootstrap-3-starter-site.
Related Issues (20)
- ErrorException in Factory.php line 564: Cannot end a section without first starting one. (View: C:\xampp\htdocs\s5\resources\views\pages\home.blade.php) HOT 4
- How to use it with Laravel 5.2 ? HOT 2
- Not ableto upload the image HOT 2
- after registration, it'll not send mail for confirmation HOT 1
- I got this after following all steps , any help please? HOT 3
- JQuery not defined HOT 3
- new crud HOT 7
- Not able to upload the photos in articles HOT 5
- text editor is not appearing
- want to change the redirection of user
- Method [validateRequired,unique] does not exist. HOT 1
- 34 Character app key generated
- No supported encrypter found. The cipher and / or key length are invalid.
- $ is not defined js error on admin site and pages are not rendered properly. any fix? HOT 1
- No Modals? HOT 5
- We should update this to laravel 5.4 HOT 1
- multiple file upload HOT 1
- Admin Style broken :( HOT 5
- Missing CSS Classes (like "form-control")
- NotFoundHttpException in RouteCollection.php line 161:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-5-bootstrap-3-starter-site.