Questions tagged [image-upload]

Use this tag for questions regarding uploading image to an online storage service such as Cloud Firestone, Amazon AWS

There are many online services and APIs that allow an app or software to upload and store images online. Some of them are: Cloud Firestore, Amazon AWS, Google photos, etc.

727 questions
123
votes
13 answers

Resize image in PHP

I want to write some PHP code that automatically resizes any image uploaded via a form to 147x147px, but I have no idea how to go about it (I'm a relative PHP novice). So far, I've got images uploading successfully, filetypes being recognized and…
Alex Ryans
  • 1,865
  • 5
  • 23
  • 31
61
votes
21 answers

Fatal error: Namespace declaration statement has to be the very first statement in the script in

I'm trying to use this to create a image form upload for my website, the reason I'm using this is because it's more secure than doing everything myself (but if someone could point another working script I would be appreciated) simon-eQ /…
user2536244
40
votes
4 answers

Django REST Framework image upload

I have model Product: def productFile(instance, filename): return '/'.join( ['products', str(instance.id), filename] ) class Product(models.Model): ... image = models.ImageField( upload_to=productFile, max_length=254,…
Danila Kulakov
  • 1,082
  • 1
  • 12
  • 20
24
votes
2 answers

Store user profile pictures on disk or in the database?

I'm building an asp.net MVC application where users can attach a picture to their profile, but also in other areas of the system like a messaging gadget on the dashboard that displays recent messages etc. When the user uploads these I am wondering…
Joshua Hayes
  • 1,938
  • 2
  • 21
  • 39
20
votes
4 answers

How to replace deprecated okhttp.RequestBody.create()

I try to upload an image from an Android App to a Django server using Retrofit 2 and OkHttp3. For that, I used to create a RequestBody instance using the following lines: RequestBody requestImageFile = // NOW this call is…
ebeninki
  • 909
  • 1
  • 12
  • 34
20
votes
6 answers

How to get files from angular 2 onDrop event?

I tried like this but onDrop method don't return image files when I drop to it... onDragStart(event, data: any) { event.dataTransfer.setData('data', data); } onDrop(event, data: any) { let dataTransfer = event.dataTransfer.getData('data'); …
Vladimir
  • 1,751
  • 6
  • 30
  • 52
19
votes
8 answers

Flutter web - Upload Image File to Firebase Storage

On flutter web, I pick an image file from the computer and get a File image object. Then I want to upload it to Firebase Storage. For Android and iOS versions of the app I was using a Firebase Cloud Function and an http multipart request. It worked,…
17
votes
5 answers

How to upload an image with python-tornado from an HTML form?

I saw examples that used pycurl, but could not be sure if this is the way to go with? Some examples will help. Thanks.
gora
  • 381
  • 3
  • 6
  • 15
14
votes
1 answer

How to upload image using raw in POSTMAN?

I am trying to upload an image using POSTMAN. I succeed with form-data but not with passing data in raw JSON format. request through form-data in POSTMAN: request through curl: curl -X POST -H "Content-Type:multipart/form-data" -F…
Shivani Sharma
  • 697
  • 1
  • 7
  • 22
11
votes
4 answers

How to upload a image and display on same page in asp.net mvc 4

i have developed a web application using asp.net mvc4 and razor syntax. i need to upload an image using file uploader and display in the same page with details of the image. as an example there's a "file uploader" and "submit button" in "contact…
sanzy
  • 805
  • 9
  • 18
  • 28
10
votes
3 answers

Angular-Summernote on-image-upload editor Object Undefined

I'm struggling on figuring out how to use angular-summernote callback on-image-upload. The code in my view: And the imageUplaod…
Kiddo
  • 1,167
  • 1
  • 12
  • 23
10
votes
3 answers

symfony2: setting the value of a form field outside the form, inside a controller action

I need to set the value of a symfony2 form element. I use a doctrine2 entity, a Symfony\Component\Form\AbstractType and the createForm() method inside my Controllers Action. $saleDataForm = $this->createForm(new SaleType(), $sale); Now, how do i…
Andresch Serj
  • 35,217
  • 15
  • 59
  • 101
9
votes
3 answers

Why do uploaded pictures disappear on Heroku?

I deployed my first Heroku app yesterday, and everything worked great. In my app you can upload an image, I did and could see it on the "show" page. However, today the image disappeared. Everything else seems to work just fine. The application is…
Lucy Weatherford
  • 5,452
  • 16
  • 50
  • 76
9
votes
3 answers

Uploading image files

Could you please help me to get image upload working on a view with django forms? Models.py class User_Profile(models.Model): user = models.OneToOneField(User, unique=True, related_name='profile') photo = models.ImageField(upload_to =…
Alex Santos
  • 325
  • 1
  • 5
  • 16
8
votes
3 answers

How do I Pass an Image from Flash to ASP.NET?

Quick version: How do I get an image that was generated on the users browser back to the server? The current plan is this: The Flash developer will convert the bitmap to JPEG He will then POST the JPEG to a page on the site. I'm thinking I can…
EfficionDave
  • 2,736
  • 3
  • 31
  • 38
1
2 3
48 49