Closed (fixed)
Project:
Services
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2011 at 11:28 UTC
Updated:
21 Nov 2011 at 22:59 UTC
Jump to comment: Most recent file
Comments
Comment #1
taran2lHere's a patch against 7.x-3.x latest version. Please review.
Comment #2
kylebrowning commentedComment #4
kylebrowning commentedI think the bot is fucked up?
Comment #5
kylebrowning commented#1: REST-server-multipart-handling-1324818-1.patch queued for re-testing.
Comment #7
taran2lComment #8
taran2l#1: REST-server-multipart-handling-1324818-1.patch queued for re-testing.
Comment #10
marcingy commented#1: REST-server-multipart-handling-1324818-1.patch queued for re-testing.
Comment #12
taran2l#1: REST-server-multipart-handling-1324818-1.patch queued for re-testing.
Comment #14
ygerasimov commentedI ran tests locally and it looks there is no fails. Bot doesn't work properly.
Meanwhile regarding the patch, it introduces trailing spaces and some styling corrections should be done.
should have space after "if"
should be
trailing spaces introduced
What is the use case when we receive enctype="multipart/form-data" and have both uploaded file and POST data? I would love to have a test for this case. I have only form submit on my mind.
@Taran2l Could you please reroll the patch with style corrections and let me know what do you think about use case?
Thanks!
Comment #15
taran2l@ygerasimov
Here's my use case: We have an Android application, which depends on Web portal. We need to store a file and device ID from the application.
So, we have created a new resource with argument device ID (Services does not allow to have a FILE type argument. Probably this moment should be improved too). Callback function copies a file resource example to save file, that have been transferred.
Do you know how to achieve this functionality with current Services implementation (maybe I'm missing something in the Services module architecture) ?
Thanks!
P.S. Rerolled patch attached.
Comment #16
taran2lSorry, wrong patch in #15. Attached proper version.
Comment #17
kylebrowning commentedThis patch looks good to me.
Taran, you can do all sorts of alters on the resources or even pre-processing every call. But if you need to explicitly handle files a different way, you can always alter the resource definition via hook_services_resources_alter
We need a 6.x of this when its committed.
Comment #18
marcingy commentedCommitted thanks
Comment #19
kylebrowning commentedComment #20
kylebrowning commentedComment #21
kylebrowning commentedComment #22
arski commentedSorry but it seems that you forgot to commit the following somehow (in the 6.x branch at least):
Everything else from the patch is nicely in the latest stable release and the -dev.. but this sadly ain't.. which breaks everything obviously :)
Cheers
Comment #23
kylebrowning commentedFixed. Thanks
Comment #23.0
kylebrowning commentedfixed typo.