image-uploading

Trouble printing out image from public folder laravel

风格不统一 提交于 2019-12-25 11:54:40
问题 I want to show the image that I had just uploaded and only show it to those who have uploaded it. For example, user table contain jack, Emily and John, so if jack were to upload a file the image will show directly under him, but I don't know how to do it? This is how it look like now: Controller: (how I store the image) public function store1(Request $request){ $this->validate($request, [ 'file' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]); if ($request->hasFile('file')) {

AFNetworking 3.0 Multipart form data for uploading image error

£可爱£侵袭症+ 提交于 2019-12-25 09:06:30
问题 I've been trying to upload an image to my AWS server using multipart form data afnetworking 3.0 but apparently, every image I tried to upload ended up in the failure block. The codes in written in objective-c. - (NSURLSessionUploadTask *)uploadImageTask:(NSMutableDictionary *)dictionary { NSString *s3BucketUrl = [dictionary objectForKey:@"s3BucketUrl"]; NSData *imageData = [dictionary objectForKey:@"imageData"]; NSString *contentType = [dictionary objectForKey:@"contentType"]; NSString

Type error: Argument 2 passed to App\AddPhotoToProduct::__construct() must be an instance of App\Uploaded,

筅森魡賤 提交于 2019-12-25 08:40:55
问题 I am getting error of invalid argument 2 and I am trying to upload multiple images through dropzone. [ERROR]FatalThrowableError in AddPhotoToProduct.php line 30: Type error: Argument 2 passed to App\AddPhotoToProduct::__construct() must be >an instance of App\Uploaded, array given, called in >C:\xampp\htdocs\mid_login1\app\Http\Controllers\ProductPhotoController.php on >line 37 ProductPhotoController.php namespace App\Http\Controllers; use App\Product; use App\ProductPhoto; use App

cropper.js uploading the original images with coordinates

做~自己de王妃 提交于 2019-12-25 07:48:10
问题 I am using cropper.js. I would like to upload the original image and the cropped coordinates(x,y,width,height) not the cropped image. What is the preferred way to do that? Thanks. 回答1: For the client side of this question, here is code I use to package up the crop box data and ship it off to the server. See esp: formData.append('last_crop', JSON.stringify($imageBox.cropper('getCropBoxData'))); $('#crop_button').click(function(){ // Upload cropped image to server if the browser supports

Unable to Insert Multiple images in MySQL Database using PHP

耗尽温柔 提交于 2019-12-25 07:37:27
问题 I am trying to insert multiple images in MySQL database. The program was working perfectly fine when I was inserting a single image in database, but now when I have added 3 images, its giving me an error message. Its not giving any MySQL error message. Kindly check it. Thanks Not a Valid Image <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content

Attachment Server for uploading files, images using JSF

一世执手 提交于 2019-12-25 07:37:26
问题 I have a different Http server(ServerB) planned for uploading the files, but figuring out what i need to run and how i should program it to make it available for my main web application(Server A) to upload and download files. So that in case if we move to cluster environment, we can still point the same attachment server for uploading images/files etc And we are not burndening the main server if we are uploading plently of files each hour. So Server B is dedicated for upload and downloading

blueimp jquery upload SyntaxError: Unexpected token <

不羁的心 提交于 2019-12-25 07:03:38
问题 I'm using the jquery library blueimp upload. I want to upload images to a different directory. I just modified the /server/php/ index.php file (only this file) : error_reporting(E_ALL | E_STRICT); require_once('UploadHandler.php'); //$upload_handler = new UploadHandler(); define(DIR_DOWNLOAD, "/Applications/XAMPP/htdocs/villalba2"); define(HTTP_SERVER, "localhost/villalba2"); $blogId= "Mobiliario"; $upload_handler = new UploadHandler(array( 'upload_dir' => DIR_DOWNLOAD . '/uploads/' . $blogId

primeFaces fails to upload file to db

杀马特。学长 韩版系。学妹 提交于 2019-12-25 05:22:46
问题 I am trying to upload a file (picture) which is part of a Product object to a database. The file upload is successful according to the jsf confirmation. However, when persisting Product the persistence is completed successfully without the picture. The server is not returning any stack. This is my form (simplified): <h:form enctype="multipart/form-data"> <h1><h:outputText value="Create New Product"/></h1> <h:panelGrid columns="2"> <h:outputLabel value="Name:" for="name" /> <h:inputText id=

Cannot preview images in Vue.js

ⅰ亾dé卋堺 提交于 2019-12-25 03:35:31
问题 After following on this greate tutorial to make a multi-file upload component in Vue.js, I'd like to be able to let users to preview images before uploading them. So I try to add a uri field to each photo file, in order to show them in a v-for loop like this: <div v-for="(file, index) in files" :key="index"> <img :src="file.uri" alt="Image"> </div> Here is the method to select files: selectFile() { const files = this.$refs.files.files; this.uploadFiles = [...this.uploadFiles, ...files]; this

Cannot preview images in Vue.js

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 03:35:06
问题 After following on this greate tutorial to make a multi-file upload component in Vue.js, I'd like to be able to let users to preview images before uploading them. So I try to add a uri field to each photo file, in order to show them in a v-for loop like this: <div v-for="(file, index) in files" :key="index"> <img :src="file.uri" alt="Image"> </div> Here is the method to select files: selectFile() { const files = this.$refs.files.files; this.uploadFiles = [...this.uploadFiles, ...files]; this