Convert attachments to web links in public libraries
I don't think I've seen this mentioned yet. Please link to relevant discussions though.
Currently, when an item with an attachment is moved to a public library, the attachment is removed. It may be more helpful if, where possible, the attachment were converted to a link attachment, which links to the PDF/document on the original website (this URL is stored with the attachment already anyway).
Here's my use case: I keep my library private, but was asked to share some literature on a topic. So I decided to go with a public library and move the relevant literature to a collection. I have PDFs attached to all of my items and would like to make it easier for my colleagues to find these PDFs. Since I can't share files directly, it would be a great alternative to provide links to PDFs (actually, I don't even want to share the PDFs I have, since they have been annotated). Access is not an issue in my case, since I am sharing within my institution, so I expect them to be able to view these online.
So basically, I think that if an attachment came from a webpage, instead of discarding it, we should just convert it to a link.
Edit: though, of course, this doesn't work with all websites (i.e. session cookies)
Currently, when an item with an attachment is moved to a public library, the attachment is removed. It may be more helpful if, where possible, the attachment were converted to a link attachment, which links to the PDF/document on the original website (this URL is stored with the attachment already anyway).
Here's my use case: I keep my library private, but was asked to share some literature on a topic. So I decided to go with a public library and move the relevant literature to a collection. I have PDFs attached to all of my items and would like to make it easier for my colleagues to find these PDFs. Since I can't share files directly, it would be a great alternative to provide links to PDFs (actually, I don't even want to share the PDFs I have, since they have been annotated). Access is not an issue in my case, since I am sharing within my institution, so I expect them to be able to view these online.
So basically, I think that if an attachment came from a webpage, instead of discarding it, we should just convert it to a link.
Edit: though, of course, this doesn't work with all websites (i.e. session cookies)
Re: session ids, we should really try not to save those to begin with.
Thinking some more about this, what if group file attachment restrictions were controlled at sync level? Right now, the client prevents file attachment copying to public groups. What if the client were to allow this, but during sync, the files would not be synced, just metadata? A few advantages:
1) It would make it very easy for users to convert a group from public to private and essentially enable file sync even after having already dragged some files to the group library. Once the group is converted to private, the attachments would sync.
2) Since metadata would be synced, you wouldn't need to convert imported-file attachments to linked-url attachments. Zotero server would be able to use the origin URL of the attachment, instead of the file itself when displaying a link on the website.
The disadvantage is that it would be less obvious that some files are not syncing, since the attachments would appear locally and would be displayed on the web, but would (sometimes*) fail to open on other computers. (*sometimes, because the client would maybe also be able to open the attachment directly from the website instead of the local file?) However, in this case, I would argue that the user would have wanted to sync attachments, in which case we're back to (1).
One actual downside that I can think of is disk space usage. Say the user will never want the group to sync file attachments. In that case, when the user drags file attachments to the group, the files would be copied locally and would take up extra space.
Alternatively, perhaps some simple guidance dialog would be sufficient (and more transparent). When items are dragged into a group for the first time, the user is notified that this is a public group and file attachments are not allowed. He would then be given the option of converting file attachments to linked-url attachments or discarding them altogether depending on the needs of the group.
</brainstorming>
Dan, is it possible (or could it be made possible) to alter group settings via api? It would also be great to create groups directly from the client
Creating a group via the client is probably not going to happen. It'd be a pretty significant duplication of work and require lots more API stuff exposed (e.g., user searching), most of which either is currently restricted to access from www or only happens on www and doesn't touch the API to begin with.
I think the drag is the right place to warn about this. If we offer a convert-or-ignore preference, we can store the preference in the (unsynced) 'settings' table and clear the entries on group deletion or mode change.
We also do have a file sync error dialog already if files exist in a group that doesn't allow them and the user tries to sync. Right now I think that offers to reset the group, which is overkill and can cause other sync problems. It should instead offer the ability to convert the existing imported-file attachments to linked-URL attachments, but we need code to create those copies in order to do that.
Of course this feature would have to be disabled where an internet connection is not available. Or the user could be prompted to change the name of the group once the internet connection becomes available (yes, this is very messy and I don't like it either, but it is convenient for the user, since he/she does not have to wait for an internet connection to start putting together a group library) My idea was to give user an option of converting a public library to a group library when he/she drags a file attachment for the first time. Ideally this would be a single click of the button, but if the API is not going to happen, we could just cancel the drag operation and open up the appropriate web page (that's a good start anyway).