Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Save Image into different domain

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one function to upload an image.

I need to save image into different domain.

So when client call my API, pass in the photo as multipart type, then I need to save it into different domain.

Does my code below Workable? I mean will it save into the stat.abc.com/userpt/ OR will hit error ?
Note: below piece of code running in app.abc.com domain. But both domains are in the same server.


please help


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code doesn't run on a "domain", it runs on a computer - a server apparently in your case. Whether files can be saved in some other directory on the same computer is a question of permissions.

What will definitely not work is using an "http" file name. You need to translate that into an actual directory name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic