Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#upload-photo-form").on('submit',(function(e) {
- e.preventDefault();
- $.ajax({
- url: "php/upload-photo.php",
- type: "POST",
- data: new FormData(this),
- contentType: false,
- cache: false,
- processData:false,
- success: function(response){
- addPhotoFormDisabled(false)
- if (response["errors"].length > 0 ) return show_upload_error(response["errors"]);
- add_new_photo(response["photo"]);
- },
- error: function(error) {
- console.log(error);
- }
- });
- addPhotoFormDisabled(true);
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement