• Post Reply Bookmark Topic Watch Topic
  • New Topic

RESTFul service to upload file, need user input. How to store state?

 
Rj Ewing
Ranch Hand
Posts: 118
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to determine what the best way is to create a restful service where you need input from the user.

I need a service to upload files. During the upload process, we validate the file. If there are any warnings, I need to ask the user if they would like to continue.

What is the best way to go about this in a restful service, and not make the user re-upload the file?

I am currently using the http session to store the tmp uploaded file location, however I realize this breaks the restful principles.
 
Tim Moores
Saloon Keeper
Posts: 3262
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't be concerned with breaking REST principles like that - the upload app as a whole may not be stateless, but the WS itself still is.
 
Rj Ewing
Ranch Hand
Posts: 118
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay, thanks. In the end I didn't think it mattered too much, but I thought I'd ask to see if there was a better way to go about it.
 
Rj Ewing
Ranch Hand
Posts: 118
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a preference between 1 or 2 upload services (Ex. "upload" & "upload/continue")?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!