2

I need an android app which can upload photos to a server, but first create a "project" folder if one is not created yet. If one is already created, it will upload photos to that particular folder. The user can have several different projects going on. How can this be accomplished? I tried to look into this link which seems to work, but there is nothing about how to create that new folder on the server.

3 Answers 3

1

I think that logic must handle the server side . You must upload the picture via a webservice , and server control if that folder exists and create it if it does not exist.

This link maybe help you. The server side its a simple php script, you should replace for your own logic.

Upload image to server

Sign up to request clarification or add additional context in comments.

2 Comments

where do I specify the folder name ? in the URL which I am sending up?
In your webservice, you can pass parameters. You can pass fileName, folderName and even more parameters. This post explains the whole case: stackoverflow.com/questions/2935946/…
1
new File("/path/to/folder").mkdir();

If you want to created nested folders (more than one folder on the path may be missing), then use mkdirs(). See java.io.File.

2 Comments

I think he want to create folder in the server side for storage, not in app
yes and you write the code for creating the folder in server. doesn't matter what connection he use. the server check if there is a folder with that name he wants. if not, it create the folder then upload the image
0

I think that logic must handle the server side

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.