If I'm understanding you properly, you mean to add support for things
like directly uploading pictures to flickr from remote sources such as a
cell-phone paired through BT, a "remote folder" mounted through ssh or
samba... and so forth
Please correct me if I'm wrong.
> I think a solution could be to create a temporal file before uploading
> the picture. But I do not know if it is a good practice. I am also
> looking for a function in flickrcurl which lets me provide the data
> instead of the path.
I think that creating a temporary local file under /tmp to workaround
that issue would not be too bad, whenever you do not keep more than one
temporary file "cached" at the same time, to avoid using too much space
for that.
In the other hand, I wonder if there could be any chance for adding URIs
support to flickcurl so we need no workaround there, although I'm afraid
that, even in the case it got accepted by Dave Beckett (flickcurl's
author) it could took too much time and your approach seems not bad at a
first glance either.
So, I would go ahead with your approach, bearing always in mind that we
should keep usage of temporary space always as low as possible.
> I think that is very useful to add remote support to the application.
> What do you think? Any help?
It sounds good. It would be great to directly upload pictures from a
cell phone through BT, for instance.
Thanks!
Mario
If I'm understanding you properly, you mean to add support for things
Urizev wrote:
> Hi,
>
> I have a patch to give support for adding remote files to the
> application and I was really easy and clean. However, I have found a
> trouble when application uploads the file due to flickcurl does not
> support URIs. The flickcurl_photos_upload_params () method only
> accepts a filepath but an URI is provided.
like directly uploading pictures to flickr from remote sources such as a
cell-phone paired through BT, a "remote folder" mounted through ssh or
samba... and so forth
Please correct me if I'm wrong.
I think that creating a temporary local file under /tmp to workaround
> I think a solution could be to create a temporal file before uploading
> the picture. But I do not know if it is a good practice. I am also
> looking for a function in flickrcurl which lets me provide the data
> instead of the path.
that issue would not be too bad, whenever you do not keep more than one
temporary file "cached" at the same time, to avoid using too much space
for that.
In the other hand, I wonder if there could be any chance for adding URIs
support to flickcurl so we need no workaround there, although I'm afraid
that, even in the case it got accepted by Dave Beckett (flickcurl's
author) it could took too much time and your approach seems not bad at a
first glance either.
So, I would go ahead with your approach, bearing always in mind that we
should keep usage of temporary space always as low as possible.
It sounds good. It would be great to directly upload pictures from a
> I think that is very useful to add remote support to the application.
> What do you think? Any help?
cell phone through BT, for instance.
Thanks!
Mario
Yes, I agree it could be useful at some point, as you mention, but for
the time being I guess the most simple approach (while good enough)
would be to keep one file on disk, regardless of using a (very simple)
cache system or not.
That's up to you :-)
Mario
PS: btw, I commented your idea here in the office with a mate and his
comment about that, in perfect spanish, was "la ostia!". Just for you to
know :-)
Urizev wrote:
> [...]
> So, I would go ahead with your approach, bearing always in mind that weYes, I agree it could be useful at some point, as you mention, but for
> should keep usage of temporary space always as low as possible.
>
>
> Of course, it should be removed as soon as possible. But maybe a cache
> system for pictures could be useful. For example, it will be necessary
> for editing flickr pictures. However, as the first approach, I will copy
> the file into a local one and then I will remove immediately after
> uploading.
the time being I guess the most simple approach (while good enough)
would be to keep one file on disk, regardless of using a (very simple)
cache system or not.
That's up to you :-)
Mario
PS: btw, I commented your idea here in the office with a mate and his
comment about that, in perfect spanish, was "la ostia!". Just for you to
know :-)
Could you please send the patches again as attachments created with
git-format-patch? That way applying them to master would be
straightforward with git-am.
Supposing you had all your changes as commits in a separate local branch
it would be as easy as 'git format-patch master' and then attaching all
the .patch files generated by that command.
And in case you had all your changes as commits directly over master
branch, just doing 'git format-patch HEAD~n', where 'n' is the number of
commits you have, will do the trick as well.
I'll be taking a look over the code in the meanwhile.
Thanks!
It looks good and, although at a first glance I was not sure about the
place where you implemented the simple cache mechanism (inside
FrogrPicture), I think now it's perhaps the cleanest way to implement
such s simple mechanism at this early stage. Later on, when the cache
system gets bigger and more complex I guess the most sane thing will be
to take that out there thought.
I have just a question at this moment: I'm not completely sure but
reading your patch I have the feeling that you're always copying every
picture to a temporary location, regardless of being a remote or a local
file. If that's the case I'd bet for adding some extra code (it does not
look as a big deal, anyway) not to cache anything for local files. But
perhaps I'm missing something and I'm wrong and I'm just saying stupid
things here :-)
Could you confirm that?
At last, just to thank you again for your contributions. I'll be eagerly
waiting for the non-screwed-up patches to try this out.
Ah! forgot to tell you in my last mail that attaching a diff file
generated with git diff > output_file is also ok, even despite I'm a git
lover ;-).
Btw, if you finally use 'git format-patch', please take a look to some
of the last commits messages in the repository with git log, to make up
an idea of how we're writting those messages write now (one brief line +
blank line + ChangeLog style log). That way applying your commit,
keeping your log message and Author in the git repository would be
pretty easy :-)
Thanks!
Mario
Mario Sanchez Prada wrote:
> [...]
> I'll be taking a look over the code in the meanwhile.It looks good and, although at a first glance I was not sure about the
place where you implemented the simple cache mechanism (inside
FrogrPicture), I think now it's perhaps the cleanest way to implement
such s simple mechanism at this early stage. Later on, when the cache
system gets bigger and more complex I guess the most sane thing will be
to take that out there thought.
I have just a question at this moment: I'm not completely sure but
reading your patch I have the feeling that you're always copying every
picture to a temporary location, regardless of being a remote or a local
file. If that's the case I'd bet for adding some extra code (it does not
look as a big deal, anyway) not to cache anything for local files. But
perhaps I'm missing something and I'm wrong and I'm just saying stupid
things here :-)
Could you confirm that?
At last, just to thank you again for your contributions. I'll be eagerly
waiting for the non-screwed-up patches to try this out.
Ah! forgot to tell you in my last mail that attaching a diff file
generated with git diff > output_file is also ok, even despite I'm a git
lover ;-).
Btw, if you finally use 'git format-patch', please take a look to some
of the last commits messages in the repository with git log, to make up
an idea of how we're writting those messages write now (one brief line +
blank line + ChangeLog style log). That way applying your commit,
keeping your log message and Author in the git repository would be
pretty easy :-)
Thanks!
Mario
> I write it here because I am not used to manage git. Sorry! I will learn to
> use.
No problem, I had no problem this time to apply your patch, and keeping
authorship is not a problem since I always can do 'git commit --author
"Your name <yo...@mail.here>"' :-)
> On Fri, Aug 28, 2009 at 6:28 PM, Mario Sanchez Prada <msan...@igalia.com>wrote:
>> I have just a question at this moment: I'm not completely sure but
>> reading your patch I have the feeling that you're always copying every
>> picture to a temporary location, regardless of being a remote or a local
>> file. If that's the case I'd bet for adding some extra code (it does not
>> look as a big deal, anyway) not to cache anything for local files. But
>> perhaps I'm missing something and I'm wrong and I'm just saying stupid
>> things here :-)
>>
>> Could you confirm that?
>>
>
> Yes. You are right, but in the current patch attached it is fixed. Now, I
> check if the file is local before copying it.
Great!
>> At last, just to thank you again for your contributions. I'll be eagerly
>> waiting for the non-screwed-up patches to try this out.
>>
>> Ah! forgot to tell you in my last mail that attaching a diff file
>> generated with git diff > output_file is also ok, even despite I'm a git
>> lover ;-).
>
>
> As you can see, I dit it in that way. :(
No place for ':(' here... I'm more like :D of having a git diff attached
:-). Keep doing it that way if it's better for you, although I'm sure as
soon you start using format-patch you'll fall in love with it ;-)
Btw, trying out your patch (did I already say I did it very quickly?) I
found some critical errors in the output as well as some problems
uploading local files ("No such file or directory") so I'm attaching you
the output log just in case you could (and wished to) take a look on it
before integrating it in master.
But if you could not don't worry, I'd take the look then as soon as
possible, although I'm afraid I won't be able to do it until next Monday
or, if lucky, tomorrow in the evening.
Thanks a lot! I'm sure this is a feature a lot of people (like me) will
love for sure!
Mario
Hey! I did not notice anything wrong (no critical errors). Could you
explain me how to repeat the error? Anyway, I think you should attach
the log. XD
>
> But if you could not don't worry, I'd take the look then as soon as
> possible, although I'm afraid I won't be able to do it until next Monday
> or, if lucky, tomorrow in the evening.
No problem. Now, I am focusing in the next feature.
>
> Thanks a lot! I'm sure this is a feature a lot of people (like me) will
> love for sure!
For sure. I think a good desktop integration is fundamental.
--
Saludos
Juan Carlos
Ooops! Sure... guess I'm too tired and I'd better go to bed right now.
Attaching now, btw :-)
The steps to reproduce the error are:
1. Open frogr
2. Drag & drop 3 pictures from 3 different sourceS:
- 1 picture from local path (this is the "no such file" error)
- 1 picture from ssh source (worked ok)
- 1 picture from bluetooth source (worked ok)
- Upload the pictures
EXPECTED: Everything should go fine
ACTUAL: the local file will throwh a "no such file" error and several
GLIB CRITICAl errores will appear on the terminal.
Others: I have the feeling that the "no such file" could have something
to do with the fact that the full path to the file has some "special
characters" in the middle, such as blank spaces or "ñ's".
In this case the full path is this:
"/home/mario/Pictures/Animales/En\ Iñás/000_0041.jpg"
... which is obviously different from what is printed out in the log:
"/home/mario/Pictures/Animales/En%20I%C3%B1%C3%A1s/000_0041.jpg"
Perhaps, some kind of conversion is still needed somehow... not sure,
though.
>> But if you could not don't worry, I'd take the look then as soon as
>> possible, although I'm afraid I won't be able to do it until next Monday
>> or, if lucky, tomorrow in the evening.
>
> No problem. Now, I am focusing in the next feature.
Ok.
>> Thanks a lot! I'm sure this is a feature a lot of people (like me) will
>> love for sure!
>
> For sure. I think a good desktop integration is fundamental.
Yep :-)
Thanks,
Mario
Great! There's no hurry btw, do take your time for that :-)
Mario